C Programming Code Examples
C > Beginners Lab Assignments Code Examples
Calendar Program
C Build Binary Tree if Inorder or Postorder -
C Program to Build Binary Tree if inorder or postorder traversal as input. Create a new node. Create a balanced binary search tree. Insert a node in the tree. Create a node and
Largest Rectangular Area in a Histogram -
Get minimum of two numbers in hist[]. Get the 'middle index' from corner indexes. Get the index of minimum value in a given range of indexes. Then returns 'index' of minimum
C Convert the File Contents in Upper-Case -
C Program to read a text file and convert the file contents in capital (Upper-case) and write the contents in a output file. Program to copy contents of one file into another by changing
Count Numbers of Words Digits & Vowels -
Program find number of words, blank spaces, Special symbols, Digits, "Vowels" by pointers. We are going to accept string use 'gets()'. We are not using scanf() to accept string because
C++ Language Code to Merge Two Arrays -
Program ask to the user to enter array 1 and 2 size, then ask to enter array 1 and 2 elements, to "merge or add" to form new array, display the result of the added array or merged array
C++ Byte Alignment in a struct Algorithm -
Get size of the current type. Align depens on the next type and also alignment defined by #pragam pack(#). Offset will be minimum of this size. If the "size of next type" is less than
Program to Implement strpbrk() Function -
Locates "first occurrence" in string string1 of any character in string string2, If a character from string string2 is found, a pointer to the character in string 'string1' is returned, if not
C++ Coding Add Two Numbers by Pointer -
To add two numbers using pointer in the C++, you have to enter the 2 number, then make 2 'pointer' type variable of same type say *ptr1 and *ptr2 to initialize the address of both the