
All the Material available on this site is absolutely Free! Please support us by subscribing via email.
Go to Downloads Page to download all the C interview question and answers as a pdf.
- What does a static variable mean?
- What is a pointer?
- What is a structure?
- How to print a pattern as shown below?
1 2 3 4 5 6 7 8 9 10
- How to swap two numbers using bitwise operators?
- What is recursion? Write a program using recursion (factorial)?
- To which numbering system, can the binary number 1101100100111100 be easily converted to?
- What are the differences between structures and unions?
- What are the advantages of using unions?
- What is scope & storage allocation of global and extern variables? Explain with an example.
- What is scope & storage allocation of static, local and register variables? Explain with an example.
- What is Pass by Value? Write a C program showing this concept.
- What is Pass by Reference? Write a C program showing this concept.
- What is an Enumeration?
- What is the use of typedef?
- What are register variables? What are advantages of using register variables?
- What are storage memory, default value, scope and life of Automatic and Register storage class?
- What are storage memory, default value, scope and life of Static and External storage class?
- What are the advantages of using pointers in a program?
- Which bitwise operator is suitable for checking whether a particular bit is ON or OFF?
- Which bit wise operator is suitable for turning OFF a particular bit in a number?
- What do the ‘c’ and ‘ v ‘ in argc and argv stand for? Explain their purpose?
- What are the differences between malloc() and calloc()?
- Where are the auto variables stored?
- Out of fgets( ) and gets( ) which function is safer to use and why?
- How can you increase the size of a dynamically allocated array?
- Write a program to check whether a given number is even or odd.
- Write a program to find the greatest of three numbers.
- Write a program to check whether a given number is a prime.
- Write a program to find the greatest among ten numbers.
- Write a program to swap two numbers using a temporary variable.
- Write a program to swap two numbers without using a temporary variable.
- How to swap two numbers using bitwise operators?
- Write a program to check whether a given number is a palindromic number.
- Write a program to check whether a given string is a palindrome.
- Write a program in C to print “Hello World” without using semicolon anywhere in the code.
- Write a program in C to print a semicolon without using a semicolon anywhere in the code.
- Write a program in C to delete a specific line from a text file.
- Write a program in C to replace a specified line in a text file.
- Write a program in C to find the number of lines in a text file.
- (i)What are the differences between the C statements below: char *str = “Hello”;char arr[] = “Hello”;
(ii)Whether following statements get complied or not? Explain each statement.
- Explain the variable assignment in the declaration int *(*p[10])(char *, char *);
- What is the value of sizeof(a) /sizeof(char *) in C code snippet below char *a[4]={“sridhar”,”raghava”,”shashi”,”srikanth”}; explain
- Write a program in C that returns 3 numbers from a function.
- In below code snippet:
struct Date - What are header files? Are functions declared or defined in header files ?
- What is the difference between the functions strdup and strcpy in C?
- What is difference between for loop and while loop in C language?
- Write down the equivalent pointer expression for referring the same element as a[i][j][k][l].
- Which one is equivalent to multiplying an unsigned int by 2, left shifting by 1 or right shifting by 1?
- Declare an array of three function pointers where each function receives two integers and returns float.
- Write a program to compare two strings without using strcmp() function.
- Write a function to concatenate two strings without using strcat function.
- Write a program to generate the fibonacci series
Write a C program which asks the user for a number between 1 to 9 and shows the number. If the user inputs a number out of the specified range, the program should show an error and prompt the user for a valid input.
- Write a program to display the multiplication table of a given number.
- Write C program to print the following pattern:
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
- Write C program to print the following pattern:
1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 4 5 4 3 2 1
- Write a C program to display the following format:
------ a b ------ 1 5 2 4 3 3 4 2 5 1 ------
- Write a C program to display the following format:
-------- no. sum -------- 1 1 2 3 3 6 4 10 5 15 --------
- What is the purpose of main() function?
- What is the difference
between declaring a variable and defining a variable? - What are the differences
between formal arguments and actual arguments? - What is difference between
getchar and scanf functions for reading strings? - What is difference between
‘break’ and ‘continue’ statements?
C Interview Questions with solutions ebook as a pdf/doc/html