Posts
Showing posts from May, 2022
c program to find Binary Tree operations
- Get link
- X
- Other Apps
.png)
Program #include <stdio.h> #include <stdlib.h> struct tnode { int data; struct tnode *left, *right; }; struct tnode *root = NULL; struct tnode * createNode(int data) { struct tnode *newNode; newNode = (struct tnode *) malloc(sizeof(struct tnode)); newNode->data = data; newNode->left = NULL; newNode->right = NULL; return (newNode); } void insertion(struct tnode **node, int data) { if (!*node) *node = createNode(data); else if (data < (*node)->data) insertion(&(*node)->left, data); ...
Program to find Swap of 2 numbers in c
- Get link
- X
- Other Apps
.png)
Program #include <stdio.h> void swap(int*, int*); int main() { int x, y; printf("Enter the value of x : \n"); scanf("%d",&x); printf("Enter the value of y : \n"); scanf("%d",&y); printf("Before Swapping x & y is : \n x = %d \n y = %d \n", x, y); swap(&x, &y); printf("After Swapping x & y is : \n x = %d \ny = %d ", x, y); return 0; } void swap(int *a, int *b) { int temp; temp = *b; *b = *a; *a = temp; } Output
Flowchart Symbols & examples
- Get link
- X
- Other Apps

ยง The pictorial representation of an algorithm with specific symbols for instructions & arrows showing the sequence of operations is known as โFLOWCARTโ. ยง The basic geometric shapes to denote different types of instructions. And these boxes are connected by solid lines with arrow mark to indicate the flow of operations. ยง An algorithm is converted into a flowchart & then instructions are expressed in some programming language. ยง The main advantage of this two-step approach . That is ,while drawing a flowchart one is not concerned with the details of the elements of programming language. ยง Since a flowchart show of operations in pictorial form, any error in the logic of the procedure can be detected more easily than in a program. FLOWCHART SYMBOLS 1. Terminal ยง It is used to indicate the beginning (START) & ending (STOP) in the program logic flow. ยง It has the shape of an ellipse 2. ...