C Programming Interview Questions and answers

C language is ruling the industry these days. If you are planning to be a part of the company too, then you may be asked the interview questions related to C programming. Usually the interviewer would not ask much questions related to C language. Here are few of the questions that you may encounter. Usually the question for such interview may begin with basic and end up with more complex questions about the language but you need to be ensuring while answering any questions, you are confident enough to speak on it.

c interview questions

So tell us about yourself?

This question is asked usually to comfort the candidate. You need to mention only those details that are associated with you and your work profile which could interest the employer.

How many years of experience do you hold?

You must furnish both relevant and irrelevant years of experience. But when it comes of talking about the relevant experience, try to explain in detail about the same.

What work profile did you hold in your previous organization?

This question is merely asked to understand if you are capable enough to handle the same or a bit higher responsibilities in this organization just the way you had in your previous organization.

Do you think you are right for this job?

Now that you have applied for this job, there must be a reason behind it. Explain the interviewer on what makes you think that this job is right suited for you and how you can help the organization.

Why do you want to leave your previous company?

This is not a tricky question in any manner; the interviewer just wants to understand the reason on whether it was the unsatisfactory reason of you leaving your job or was it the salary issue or some other problem which made you resign from the company.

Can you tell us about C language?

Oriented in the year 1972, this is a programming language that helps to implement the UNIX operating system. It is an ANSI/ISO standard which helps to develop a real time application as well.

Can you explain us about a self-referential structure?

It usually contains the similar structure pointer variable as that of the structure which is self-referential.

Do you think that built-in header file contains definition of built-in function

The answer for the same is usually no as the header file is the only one to declare the function. The definition which is usually present in the library is linked with the linker.

Who is the developer of C language?

This is to check if you have knowledge of such knowledge in depth. There is no crime in not knowing the answer for the same. But remember, in the year 1972 Dennis Ritchie developed it at Bell Laboratories

Can you tell us about static variable?

The value of the static local variable is retained aiming the default value and function call. Thus, the function will print 1 2 3 if called thrice.

void F() {

static int a;


printf(“%d “,a);


What is the benefit to declare the void pointers?

Till now, to know the type of memory that addresses the pointer variable for a better hold is not known. However, it is possible to declare the void pointer in such.

Can you explain about dangling pointer?

There are valid addresses being hold by a pointer. However, the held addresses is freed or released later. Such pointer is known as dangling pointer.

For how long can you stay with us?

This question reflects the stability and commitment that you are ready to give the company. It is always better to mention long term stability with the organization.

Do you know what token exactly mean?

C program has got different tokens. Token can b string, keyword constant, symbol, literal or an identifier too.

Are you an individual contributor or a team player?

It is always better to tell the company that you prefer working in the team. This reflects on how well you can give you contribution to the company.

What is the purpose of typedef keyword?

Such question is to just check how well you are aware about C language. You can answer the same stating it is used as a pseudonym to the pre-existing type and simplify the type of complex declaration.

Can you elucidate about rvalue and lvalue?

In an expression in a code that which appears to the right side of the equal to sign is rvalue and the other on the left side is lvalue. Remember, Ivalue should delegate only a variable and there is no other possibility.

Are you flexible to work in the extended working hours?

Sometimes working on C language or any other software programming may take time for a particular project and you might even have to extend your working hours. For this, you need to be ready.

“Is there difference between actual and formal parameters?”

When the parameter are transferred to the function values at the calling end, it is known as actual parameter. Whereas when they are received at the function definition, it is known as formal parameter.

Is it possible to compile the program without using main() method

This question is pretty simple to answer. It is definitely possible to comply but you cannot execute it as it needs main () method definition.