C Interview Questions
This all the questions asked by the interviewers in interview.
C Baics:-
- What is main() in c language.
- Write a C program without main.
- What is meant by <stdio.h> in c language.
- What is meant by # in c language?
- Write Hello World Program in c Language
- What is meant by Conditional statement in c and what are they?
- How many Loops in C and what are they?
- How many statements are there in c language?
- Data Types and it ranges in C languages.
- What are the constants?
- How many keywords and identifiers in c language?
- What is the different between ‘for’ and ‘while’ and do-while loops?
- Write a power of 2 program in c language.
- Write palindrome program in c (given number or string).
- Write c program to print 1 to many numbers without using for loops.
- Write c program to print reverse number in c.
- Define volatile variable in c language?
- Write a Prime number program in c language?
- Write a Fibonacci series program in c language?
- Write a Factorial program in c language?
- How many operators are there and what are they .Explain briefly?
- What is Type casting, how it works?
- What is meant by operator precedency?
- What is the return value of printf?
- what are the printf formats in c language?
- Explain about Go-To statement?
- Explain about do-while loop?
Storage Classes:-
- Explain briefly about Storage class in c?
- What is Extern variable? How to declare it?
- What is Static variable? How to declare it?
- What is Auto variable? How to declare it?
- What is Register variable? How to declare it?
- Wat is the different between Automatic variable and Integer variable?
- What does it mean a function declared as ‘static’?
- How extern variables is different from normal variables?
- Can we print the address of register variable?
- In what case can we use register variable?
- When do we declare the variable as ‘extern'?
- How to declare a ‘file scope function’?
- Define ‘static function’ properties?
- What is scope & storage allocation of extern and global variables?
- What is scope & storage allocation of register,static and local variables?
- What is the storage memory, default value, scope and life of automatic, extern, static, register variables?
Compilation Stages:-
- What is meant by Compilation Stage?
- How many compilation stages are there?
- What is the difference between storage classes and storage sections in c?
- Which stage use which compilation ? What is the extension for each one?
- What are the properties of Loader?
- Explain about the stages and what each stage will give extension.
Macros:-
- Explain user define and #define difference?
- What it meant by #define.
- What is meant by typedef?
- What is the difference between #define and typedef?
- Write a program to find out the given number is less than or greater than by using macros?
Arrays:-
- What is array?
- Difference between array [0] and &array [0].
- Define array of pointers and pointer to an array.
- What is meant by double dimension array? write an example program?
- How to accessing two dimensional array by using Pointer to an array?
- How to delete duplicate elements in array?
- Write array of pointers example program?
- Using single array reverse the order in array?
- How to create two dimensional array using double pointer?
Pointers:-
- What is a pointer ?
- Define pointer and what are the uses of pointer?
- How to allocate dynamic memory.
- Explain how many pointer in c and each and every one.
- Malloc return type, Calloc return type, Realloc return type?
- Explain constant pointer, pointer to constant and constant pointer to constant.
- Determine Endianness of your machine? Little-endian and Big-endian.
- Difference between NULL and VOID?
- How to allocate variable to a pointer?
- realloc(zero) means how much memory will allocate?
Functions:-
- Describe about Function?
- Define function and function pointer?
- What is meant by function definition and function declaration?
- Difference between call by value and call by reference in c?
- Write function pointer program in c language?
- What is meant by function prototype? What is it uses?
- Write a program for nesting of function?
- Write a function recursion function?
- What is the scope and lifetime of variables in functions?
Strings:-
- Define string.
- Write program of pointer and array using stripy()?
- Write program of pointer and array using strstr()?
- Write program of pointer and array using strleng()?
- Write program of pointer and array using strrev()?
- Write program of pointer and array using strcmp()?
- Write program of pointer and array using strcat()?
- Explain and example program of memset()?
- Explain and example program of memcpy()?
- Explain and example program of memmove()?
- Write program for upper case to lower case and lower case to upper case ASCII values?
- Write a program to get the string “123” converted as integer value 123?
- Write a program without using strcmpy,strcpy,strncpy.......?
Bit Manipulations:-
- What is meant by bit manipulations? When we use it?
- Which bitwise operator is suitable for checking whether a particular bit is ON or OFF?
- Which bitwise operator is suitable for tuning OFF a particular bit in a number?
- Write program macros using clear bit, set bit, toggle bit, show bit (Ternary operator using), Nibble Swap.
- Write program bit operation using odd or even number.
- Swapping two numbers without using third variable.
Linked lists:-
- What is a linked list?
- What are the parts of a linked list?
- How to create single linked list?
- How to create double linked list?
- Create linked list by add from starting, add from ending, add from middle?
- How to find middle node?
- Write a program for reverse linked list?
- How to create fining the loop in linked list?
- How to find last nth node?
- Write a circular linked list program?
- How to delete middle node in linked list?
- How to create double linked list?
- Deleting a node in double linked list.(starting ,middle, last)?
- Reverse a linked list in double linked list?
Structures and Unions:-
- What is Structure?
- What is union?
- What is the difference between structure and union?
- How to create structure and union? How to accessing it?
- How to accessing structure and union by using pointer variable?
- Explain self-referential structure in c?
- Example program of nested structure and union?
- What is the advantages of union?
- Explain padding?
- Without using size, how to print size of structure?
- What is an Enumeration constant?
- How can we use the typedef in structures?
- How to over come padding?
- Write a program to print the union variables with in the structure?
- What is #pragma?
Stack:-
- Write program array using stack?
- Write program linked list using stack?
- What is FIFO and LIFO?
- How function stack will allocate in c?
- What is meant by stack and how it will work?
- What is push and pop?
-----------------------------------------------------------------------------------------
More details about C interview questions and programs: http://learnclanguage4.blogspot.com/
No comments:
Post a Comment