C Programming Code Examples
C > For Loops and While Loops Code Examples
C program to convert Decimal to Octal number system
Performs Edge Coloring to the Line Graph -
Takes the input of the number of 'vertexes' & the number of edges in the graph. It takes the input of vertex pairs for the given number of edges. It generates a line graph for the given
Calculates Area & Circumference of Circle -
To calculate area and circumference we must know the radius of circle. C program code will prompt user to enter the radius and based on the input it would calculate the values. Make
C++ Code Finds Greatest Common Divisor -
This means a 'greatest number' which divides both numbers. Example: Two numbers are 18 and 24. Numbers which Divides both are 1, 2, 3 and 6 in which greatest number is 6. So 6 is
Getting a User Input as String in The C++ -
This can be considered as inefficient method of reading user input, why? Because when we read the user input string using cin then only the "First word of the String" is stored in char
Implement Doubly Linked list using Singly -
Program implements doubly linked list using singly Linked List. It makes use of 2 pointers, one points at the current node, other points at the head and when user requests to move
C++ List of Signals along with description -
In C++ programming, "signals" are interrupts of software which is delivered to a process by the OS ("operating system"). Signals can also be issued by the OS on the basis of system or
Find Reverse of String by strrev() Function -
C program code find Reverse of a given string using Loop. There are numerous ways to find reverse of a string. Input the string from user, store it in a variable say "str". Declare another
Swapping numbers Function Call by Value -
Before we discuss function call by value, lets understand the terminologies that we'll use while explaining this: Actual parameters: The parameters that appear in function calls and