# Blog : Online Interview Questions

##### C program to add two numbers This Program stores two integers into the int datatype by using to variables. After that store the sum of these two variables into another variable and display it on the screen.After the successful compilation of the program, Program sums up the two entered numbers at once.

##### C program to print prime numbers between 1-100 This Program runs a loop from 2 to 100 and checks for each current number within range that it is prime or not. After the successful execution of the program it displays the list of all prime numbers from 2 to 100. As we know that 1 is not a prime number so we don't need to check it.

##### C program to swap two numbers This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once.

##### C program to swap two numbers without using third variable This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once or you can say that it assign a's value to b and b's value to a.

##### C program to find gcd of two numbers This Program stores two integers one by one into the int datatype. After that find the Greatest common factor of these two numbers as shown as output.

##### C program to find lcm of two numbers This Program stores two integers one by one into the int datatype. After that find the least common factor of these two numbers as shown as output.

##### C program to find factorial of a number The factorial of a positive number n is calculated by: The factorial of n (n!) = 1 * 2 * 3 * 4....n In this program we will find the factorial of a number where the number should be entered by the user. Factorial is sequence of a number whose multiply all previous number.

##### C program to check leap year This Program accepts year from users and check whether the given year is leap year or not using ladder if else.

##### C program to insert an element in an array This Program insert 50 at 4th index to the given array.

##### C program to print pascal triangle Pascal Triangle is named as the Mathematician Blaise Pascal. This Program shows a Pascal Triangle in front of you as a output.

##### c program to multiply two matrices This Program multiply the elements of the two 3 x 3 matrices.

##### C program for matrix addition This Program shows matrix addition through the addition of corresponding elements of the matrices.

##### C program to find area of circle A circle can be defined as a locus (a set of points in a particular position) of points that maintain equidistant from another point called the center. In this Program first of all User Enter the radius of the circle then it shows the area of the circle according to the given radius by using formula. Area is always squarely proportional to the radius.

##### c program sum of digits Number is an arithmetical value, expressed by a word, symbol, or figure, representing a particular quantity and used in counting and making calculations. In this Program first of all User Enter the an integer number then Program display the sum of digits of inputed number as an output.

##### C program to get square root of a number Number is an arithmetical value, expressed by a word, symbol, or figure, representing a particular quantity and used in counting and making calculations. This program allows the user to enter any number and then finds the square root of that number using math function sqrt () This program uses the math function findSQRT(int number) to find the square root of a number. As we all know √number = number½.