Q.1: What is C language    in your opinion?
 Developed by Dennis Ritchie between 1969 & 1973. Developed at the Bell Laboratories, aimed to use with UNIX OS. Widely...
Q.2: What is a staticvariable in context of C      language?
 Declared inside a function. Declared for function name. Declared for Global parameters.
Q.3: Can you explain the difference between a normal variable and a        pointer?
 A normal variable can have any value and can be changed throughout the length of the program. A pointer defines the add...
Q.4: What is the     differencebetween calloc() and     malloc()?
 malloc() will create single block of memory of  size specified by the user. Example - p=(int*)malloc(sizeof(int)*5) ca...
Q.5: What is thedifference between printf()       and sprint()?
 Printf() outputs the data to the standard output device which is usually the computer monitor. Sprint() outputs the dat...
Q.6: Which is the fastestsorting method you canuse while programming inc language?
This is a question which falls into “There is noone-size-fits-all answer” category. But fewoptions are- Quick sort. Radi...
Q.7: Is using functions or  macros better when  programming in C?
 Macros are generally more efficient and faster. Macros cannot handle complex programming constructs and in such cases f...
Q.8: What is a Stack?
 Stack is where information required to call and return function resides It also stores a functions local variable Stac...
Q.9: What is thedifference between C and           C++?
 C++ is an advanced version of C which introduced a lot of new features like classes and so on. It’s much more object or...
Q.10: Is it good to usegoto statement?
 goto statements are used to implement a local jump during program execution. It is not considered a good practice to us...
For more C++ gyan, log on           to-    YourNextLeap.com
C programming interview questions
Upcoming SlideShare
Loading in …5
×

C programming interview questions

12,531
-1

Published on

Popular interview questions asked during technical interview for C programmers.

Published in: Education, Technology
4 Comments
14 Likes
Statistics
Notes
  • Great work. Also check out the video on C Interview Questions. https://www.youtube.com/watch?v=74MXPf8ToNk
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • programming challenges and hackathons, visit www.edufyme.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • data regarding stack is wrong... correct it immediately....
    regards..
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Regarding slide 17: Stack follows a LIFO model, not a FIFO model. Queues follow a FIFO model, however, being that entries are inserted into one end of a 'pipe' (so to speak), and retrieved from the opposite end of the 'pipe' => sort of like water trickling down a gutter.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
12,531
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
940
Comments
4
Likes
14
Embeds 0
No embeds

No notes for slide

C programming interview questions

  1. 1. Q.1: What is C language in your opinion?
  2. 2.  Developed by Dennis Ritchie between 1969 & 1973. Developed at the Bell Laboratories, aimed to use with UNIX OS. Widely used for developing application software, though it was mainly invented for developing system software.
  3. 3. Q.2: What is a staticvariable in context of C language?
  4. 4.  Declared inside a function. Declared for function name. Declared for Global parameters.
  5. 5. Q.3: Can you explain the difference between a normal variable and a pointer?
  6. 6.  A normal variable can have any value and can be changed throughout the length of the program. A pointer defines the address where another variable is stored and not any value.
  7. 7. Q.4: What is the differencebetween calloc() and malloc()?
  8. 8.  malloc() will create single block of memory of size specified by the user. Example - p=(int*)malloc(sizeof(int)*5) calloc() takes two arguments and zero initializes the memory. It can assign multiple blocks of memory for a variable. Example - p=(int*)calloc(5,sizeof(int)*5)
  9. 9. Q.5: What is thedifference between printf() and sprint()?
  10. 10.  Printf() outputs the data to the standard output device which is usually the computer monitor. Sprint() outputs the data to a character array.
  11. 11. Q.6: Which is the fastestsorting method you canuse while programming inc language?
  12. 12. This is a question which falls into “There is noone-size-fits-all answer” category. But fewoptions are- Quick sort. Radix sort. Merge sort.
  13. 13. Q.7: Is using functions or macros better when programming in C?
  14. 14.  Macros are generally more efficient and faster. Macros cannot handle complex programming constructs and in such cases functions are used We can choose macros or functions based on our priority - speed vs. size of program.
  15. 15. Q.8: What is a Stack?
  16. 16.  Stack is where information required to call and return function resides It also stores a functions local variable Stack follows a FIFO model
  17. 17. Q.9: What is thedifference between C and C++?
  18. 18.  C++ is an advanced version of C which introduced a lot of new features like classes and so on. It’s much more object oriented compared to the general purpose programming C was initially created for.
  19. 19. Q.10: Is it good to usegoto statement?
  20. 20.  goto statements are used to implement a local jump during program execution. It is not considered a good practice to use goto statements and should be avoided as much as possible.
  21. 21. For more C++ gyan, log on to- YourNextLeap.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×