Beruflich Dokumente
Kultur Dokumente
1) String functions
2) Btrees
3) Stack, Queue
4) ctype.h
String functions
String I/O Functions
• There are special functions designed specifically for String
I/O.
• gets(string_name);
• puts(string_name);
• Gets function reads in a String from keyboard. When the
user hits a carriage return the string is inputted.
• The carriage return is not part of string and end of string
character is automatically appended.
• The function puts displays a string on monitor
Example
char phrase[100];
printf(“enter a sentence”);
gets(phrase);
puts(phrase);
Level
node (13)
degree of a node 1
3 A 1
leaf (terminal)
nonterminal 2
parent
children 2
B 2 1 C 2 3 D 2 3
sibling
2 E 3 0 F 3 0 G 31 H 3 0 I 3 0 J
degree of a tree (3) 4
3
ancestor
level of a node
height of a tree (4) 0 K 4 0 L 4 0M 4
Terminology