C Interview Questions and Answers

What is C language?

C is a high-level programming language and first developed in 1972 by Dennis Ritchie and Ken Thompson at AT& T Bell Labs.

Why C is sometimes called a mid-level programming language?

C supports both low-level (machine) and high level programing that is why it is also known as a mid-level programming language.

What are the advantages and disadvantages of C language?

Advantage and disadvantage of C are
It is a high-level programming languages that is closer to human languages, especially English.
C programs can be reused, by saving into a library file and invoking simply by including the library file.
C allows to access computer hardware and peripherals. 
It used compiler, so once program become executable code then we can run it without interacting the compiler.

It used complier so complied code not portable on different machine.
C is a procedural language, become difficult to maintain for large application.
Less support to GUI.

What is a variable?

A variable is a name representation of memory storage location and that value can change between program execution.

What is the difference between variable declaration and variable definition?

Declaration associates type to the variable whereas definition is value assignment of the variable.

What is a constant?

When variables are declared with the const keywordcalled constant. The value ofconstant never changed.

What is the difference between local variable and global variable in C?

Local variable: A variable which is declared inside function or block is known as local variable.
Global variable: A variable which is declared outside function or block is known as global variable.

What is Storage Class in C and types of it?

The storage class represent scope and storage type in memory of variable in C.
There are four types of storage cases: Auto,Extern,Static and Register

What is auto keyword in C?

The auto keyword indicate that the memory location of a variable is temporary. Whereas by default every local variable of the function and block is automatic (auto). 

What is the use of static variable in C?

A variable declared with static keyword, is known as static variable. The static variable retains its value between multiple function calls and has permanent scope.

What are register variables? What are the advantages of using register variables? 

A variable is declared with a register storage class, known as register variable. The register variable is stored in the CPU register instead of main memory. 

Storing of frequently used variable in register might be speed up the code as variable access is faster from register in compare from memory. 

What is the purpose of type declarations? Or use of typedef?

The type declaration allow to create a name synonym for the existing data types that can help to simplify the complex declaration.

typedef type identifier; 

How do you know the size of a data type or variable?

The sizeof operator can measure the data type size.

What is type casting?

Converting one data type into another is known as type casting.

What is a function and advantages of it? 

A function is a block of set of instruction that perform specific task.
Reusability: function can be reuse in different place to perform same task
Code reduction: repeated code can move into function and can call function in place 
Modularity: task can be simplify by dividing that in modularity, that also increase readability

When is the void keyword used in a function?

When declare functions with void then it will not require return a value.

Latest Updates


By what number should we multiply -1/5 so that the product may be 9/25?

Profit and Loss

A person sells an article for Rs 550, gaining 1/10 of its cost price. Its gain percentage is.


If 3x + 2y = 12 and xy = 6, then 9x2 + 4y2 = ______.

Volume and Surface Area

In a temple there are 25 cylindrical pillars. The radius of each pillar is 28cm and height 4m. The total cost of painting the curved surface area of pillars at the rate of Rs. 8 per m2 is:

Problems on Ages

After 12 years, I shall be 3 times as old as I was 4 years ago. My present age is:

Square and Cube Root

The smallest number by which 1100 must be multiplied so that the product becomes a perfect square is____.


What is the probability that a number selected from the numbers 1, 2, 3,…….,25 is a prime number, when each of the given numbers is equally likely to be selected?

Square and Cube Root

What is the smallest number by which 3087 must be divided so that the quotient is a perfect cube?


The most comfortable distance at which one can read with a normal eye is:


Cholera is caused by:

Write the name of reptile with four chambered heart?

Compound Interest

Raj borrowed Rs. 5000 at 10% per annum on simple interest and lent the same amount at 15% per annum on compound interest. At the end of 2 years, he would ?


If the area of a square is 16 cm2, then the area of the square joining the mid-points of the sides is?

General Knowledge of MP

Vidisha is situated on the banks of river?

General Knowledge of World

When is the Human Rights Day celebrated?

Profit and Loss

By selling coconuts at the rate of Rs. 6/- each, a trader gained 20%. Find the cost of 100 coconuts?

General Knowledge of India

How many coastal state are in India?


A person is to count 4500 currency notes. Let an denote the number of notes he counts in the nth minute. If a1 = a2 = .... = a10 = 150 and a10 , a11 ,... are in an AP with common difference – 2, then the time taken by him to count all notes is ?