Академический Документы
Профессиональный Документы
Культура Документы
17 Votes
All the Material available on this site is absolutely Free! Please support us by subscribing via email.
Enter y our email below
Subscribe
We do not sell y our em ail or spam .
Go to Downloads Page to download all the C interview question and answers as a pdf. 1. What does a static variable mean? 2. What is a pointer? 3. What is a structure? 4. How to print a pattern as shown below?
1 23 456 7891 0
5. How to swap two numbers using bitwise operators? 6. What is recursion? Write a program using recursion (factorial)? 7. To which numbering system, can the binary number 1101100100111100 be easily converted to? 8. What are the differences between structures and unions? 9. What are the advantages of using unions? 10. What is scope & storage allocation of global and extern variables? Explain with an example. 11. What is scope & storage allocation of static, local and register variables? Explain with an example. 12. What is Pass by Value? Write a C program showing this concept. 13. What is Pass by Reference? Write a C program showing this concept. 14. What is an Enumeration? 15. What is the use of typedef? 16. What are register variables? What are advantages of using register variables? 17. What are storage memory, default value, scope and life of Automatic and Register storage class? 18. What are storage memory, default value, scope and life of Static and External storage class? 19. What are the advantages of using pointers in a program? 20. Which bitwise operator is suitable for checking whether a particular bit is ON or OFF? 21. Which bit wise operator is suitable for turning OFF a particular bit in a number? 22. What do the c and v in argc and argv stand for? Explain their purpose? 23. What are the differences between malloc() and calloc()? 24. Where are the auto variables stored? 25. Out of fgets( ) and gets( ) which function is safer to use and why? 26. How can you increase the size of a dynamically allocated array?
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
1/6
10/24/13
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. 56. Write a program to display the multiplication table of a given number. 57. Write C program to print the following pattern:
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
2/6
10/24/13
61. What is the purpose of main() function? 62. What is the difference between declaring a variable and defining a variable? 63. What are the differences between formal arguments and actual arguments? 64. What is difference between getchar and scanf functions for reading strings? 65. What is difference between break and continue statements? C Interview Questions with solutions ebook as a pdf/doc/html
About t he Aut hor: Sridhar Jam m alam adaka is the Editor of Interv iew Mantra. He is a student pursuing m asters in International Institute of Inform ation Technology . With ov er 4 y ears of IT experience, he is obsessed with software program m ing and com puter technologies. He lov es to see a software com e to life in its dev elopm ent life cy cle. He is a person who defies "m ob m entality " and a deeply spiritual and a strong believ er of m oral v alues and righteousness. Through this website, he wishes to gather a large com m unity of aspiring engineers, entrepreneurs and professionals from all parts of the globe. You can connect with him on Facebook ht t p://www.facebook.com/sridhar.j
Advertise
Advertising Websites
Business Solution
Download All
Share
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
3/6
10/24/13
S hraddha
I was asked at the TCS interview: How will you write a macro for declaring a 4byte number while using an 8bit processor? I do know there's typecasting involved but I stumbled while writing the syntax. Please ans this if u know Sridhar. Regards, Shraddha
13 Gopi Reply
a year ago
Share
Hi gopi, This should print the above pattern., /*pattern printing 0 1111 22222222 3333 4*/ printf("\n0"); for ( i = 0; i <= n; i ++) {
see more
Reply
Share
Avatar
P at hak ay us hi2612
a year ago
7777 555 33 1
s hubham gujarwas ia
******FOR FIRST ONE******* #include<stdio.h> #include<math.h> int main() { int i,j; printf("\n a program to print a pattern:"); printf("\n********************************\n\n\n"); for(i=4;i>0;i--) { for(j=0;j<i;j++) #include<stdio.h="" *************for="" getch();=""
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
4/6
10/24/13
Reply
Share
Avatar
Zy t haar
a year ago
Avatar
Jdfh
2 years ago
Avatar
V vvraman88
2 years ago
i want code for the following ***** **** *** ** * please mail me the code my id is : vvvraman88@gmail.com
Reply Idk Lol Share
Vvvraman88 2 years ago
#include<stdio.h> #include<conio.h> void main() { int i,j,s,nos=0; for(i=5 ; i>=1 ; i--) { for(s=nos ; s>=1 ; s--) { printf(" "); } for(j=1 ; j<=i ; j++) { printf("*"); } printf("\n"); nos++; } getch(); }</conio.h></stdio.h>
Reply Share
Avatar
May a
3 years ago
Avatar
A s hok
4 years ago
there are 2 cases : 1. return 0; & return 1; at a time OR 2.return 1,0; these are valid ! then please give me difference between both and when are they used?
Reply admin Share
Ashok 4 years ago
@Ashok, The value returned from the main() is sent to the host environment or the parent process that calls your program. The parent might need to follow different paths depending on the success or failure of your program. Hence, one must always return a value from the program that returns its status back to the callee. return 0 means that the program was executed successfully, return 1 means that the program was terminated abruptly. 1 is returned when something goes wrong in the program execution.
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
5/6
10/24/13
Su b s cri b e
Ad d D i s q u s to yo u r s i te
P R E V I OU S P OS T:
variables.
N E X T P OS T:
www.interviewmantra.net/2008/11/list-of-all-c-interview-questions-in.html
6/6