C Interview Questions - Campus Placements - Part I

Getting a first job is a dream for everyone in this world. A typical job seeker refers hundreds of books, sample questions papers and get himself geared for the big day. A neatly worn dress, with all the certificates on hand, the testing starts the moment the interview panel starts questioning his expert areas.

Most of the questions are asked from a single basic language - C. If you have quoted your skills in C as your strength, then you are sure to be asked questions starting from the basics. It is wise that you have a good brush up of the language before even you write about it in your CV. Never underestimate the interview panel. The panel is always talented enough to estimate you with a few questions.

I'm listing down some of the questions in C which is really elementary and you ought to have a good grasp on them. So, before even you write C as your primary skill, make sure that you know something on the questions listed below. A very simplified way of explaining the answers to these questions will also be an added advantage. So, here we go

1) What is the difference between malloc() and calloc() ?

2) Give an example for passing by value and passing be reference. When should you use them and why? (believe me! Most of the candidates get wrong here)

3) What is a register variable?

4) What do we use typedef for?

5) What is the difference between Structure and Union?

6) What is a far pointer? When do we use it?

7) What is a NULL macro? What is the difference between NULL macro and NULL pointer?

8) Write a simple file handling program in C, opening a file, write to the file and close it.

9) Which bit wise operator is suitable for checking whether a particular bit is on or off?

10) How will you compare two strings, without using strcmp?

11) What do the functions atoi(), itoa() do?

12) What are the advantages of using pointers in a program?

13) Explain different storages classes in C.

14) What do 'c' and 'v' stand for in argc and argv?

15) What is the difference between rand() and random() ?

No comments:

Post a Comment