193 7 79KB
English Pages 2 [3] Year 2021
0
0
x
x
0
0
0
0
x
x
0 x
0 X
Short essays in computer science and Information Technology
Volume 1 By Biju Vinodini Chidhambaran
1.C Programming
The below C program implements a message of displaying “ All humans are mortals”
#include main() { printf(“\n All humans are mortals”); )
The include file is a standard library which contains the definitions and declarations of supported library functions. The main function in c program is unique and must contain functions for all tasks. In the above program there contains function definition only which shows the message of “ All humans are mortals “ in standard console by printf library function. Next program contains data and function definition and the range of programs in handling memory #include main() { int i; int *ii; i=10; ii=&I; printf(“\nDirect reference value=%d”,i); printf(“\nIndirect reference value=%d, *ii); }
The above c program execution returns shows the direct memory or data value of the defined variable and also accesses and shows indirect way of referencing the same data .
2. Trees
Trees are collection of lines and points. Collection of points is called nodes. And collection of lines is called edges. An edge connects two distinct nodes. Root is a distinguished node in a tree . A tree is connected . For example T= {(n1, n2), (n1,n3),(n1,n4),(n2,n5),(n2,n6),(n4,n7),n1,n2,n3,n4,n5,n6,n7} . Here T is a description of atree in set notation. Node d is a descendant of node a if and only if a is an ancestor of d. Nodes that have the same parent are called siblings
A leaf is a node of a tree that has no children . An interior node is a node that has – one or more children. Every node of a tree is either a leaf or an interior node, but not both