C Interview Questions and Answers

What is Recursive Functions?

The function can be called by another function and can call itself from a statement inside the body of the function itself. When function called itself then is said to be recursive.

What is the purpose of main() function?

C program execution starts and ends with the main() function .
The main() function can returns an integer value to the environment that called the program. Where return 0; indicates program is terminated normally.

Can we compile a program without main() function?

Yes, we can compile program but it can't be executed.

What is the use of printf() and scanf() functions?

The printf() function is used for output and scanf() function is used for input.

What is the difference between the while and do-while statements?

The main difference is that in the while statement, the conditional expression is evaluated at the top of the loop, while in the do-while statement, the conditional expression is evaluated at the bottom of the loop. 
Therefore, do-while statement are guaranteed to be executed at least once even conditional expression will be fail.

What is the difference between break and continue statement?

break is a keyword used to terminate the loop or exit from the block. The control jumps to next statement after the loop or block.
continue is a keyword used for skipping the current iteration and go to next iteration of the loop.

What goto statement do?

The goto statement is to enable the programmer to jump unconditional from one spot to some other spot in the code. Uses of goto statement is not recommended because it can make program unreliable and hard to debug.

What Is a Pointer?

A pointer is a special variable that contains the memory address of another variable or function. 
Whereas address-of operator (&) can be used to obtain the address of a variable and   the asterisk (*) in a variable declaration tells the compiler that the declared variable is a pointer.

What are the usage of pointer in C?

A pointer is used in the following cases 
Accessing array elements
Dynamic memory allocation
Call by Reference
Data Structures like tree, graph, linked list etc.

What is Null Pointers?

A pointer is said to be a null pointer when its right value is either null or 0. Remember, a null pointernever point to valid data.

What is a pointer on pointer?

Pointer variable can hold the address of another pointer variable is known as a pointer on pointer.

What is the advantage of declaring void pointers?

The void pointer can be converted anytime into any generic type pointer by casting operator.

What is a pointer to a function?

A pointer can hold the reference of the function is called pointer to a function.

What is the difference between actual and formal parameters?

The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters.

What is Pass by Value & Pass by Reference?

Pass by Value:In this method,the value of each of the actual arguments in the calling function is copied into corresponding formal arguments of the called function.In pass by value,the changes made to formal arguments in the called function have no effect on the values of actual arguments in the calling function.

Pass by Reference:In this method,the addresses of actual arguments in the calling function are copied into formal arguments of the called function. This means that using these addresses, we would have an access to the actual arguments and hence we would be able to manipulate them.

What Is an Array?

An array is a collection of variables with same data type. Item of array is called an element. All elements in an array are referenced by the name of the array and are stored in a set of consecutive, adjacent memory slots.the index of an array starts from 0.

Latest Updates

Articles

Choose appropriate article for the given sentence:
__________ teachers had ________ late lunch as their meeting lasted longer than___ hour.

Child Development & Pedagogy

Which of the following is the most effective way to create interest for learning in a student?

The rules of presenting the content to make them easy are called_________?

The term SLD in children’s mental health denotes for?

The child will be able to use proper sentences by the age of?

Indian Politics

______is an institutional mechanism to provide representation to the states of India?

Books and Authors

Which text is not written by Kalidasa?

Indian Constitution

Which Constitutional Amendment introduced Right to Education as a Fundamental Right?

Indian History

Which animal is engraved on Harappan seals?

Indian Politics

Who is known for initiating electoral reforms in India to ensure free and fair elections?

Indian Constitution

The sequence in which the given terms are mentioned in the preamble to the Constitution of India is?

Which of the following parts of the Constitution of India provides fundamental rights ?

Books and Authors

Who among the following is the author of ‘Politics’?

Which one is the text not written by Abul Fazl?

Which King was the author of Ratnawali, Nagananda, Priyadarsika?

Fill in the blank

Fill in the blanks with the most appropriate preposition in the given sentence.
The class begins _______ 7:30 am _____ the morning.

The workers were so skilled that their _____ was quite visible even to a layman.

Articles

Choose appropriate article for the given sentence:
______ German is ___ easy language to learn for English speaking students.

Latest Job Notifications

Banking Jobs

बैंकिंग कार्मिक चयन संस्थान Institute of Banking Personnel Selection(IBPS) - 7855 पद - 29/07/2022 अंतिम तिथि

SSC Recruitment

कर्मचारी चयन आयोग (एसएससी) Staff Selection Commission (SSC) - 1411 पद - 29/07/2022 अंतिम तिथि

Jobs in Rajasthan

राजस्थान अधीनस्थ और मंत्रिस्तरीय सेवा चयन बोर्ड Rajasthan Subordinate and Ministerial Services Selection Board (RSMSSB) - 5546 पद - 22-Jul-2022 अंतिम तिथि

Railway Recruitment

उत्तर मध्य रेलवे भर्ती प्रकोष्ठ Railway Recruitment Cell(NCR) - 1659 पद - 01/08/2022 अंतिम तिथि

Jobs in West Bengal

इंडियन पोस्ट सर्विस Indian Post Service - 2357 पद - 19/08/2021 अंतिम तिथि - पश्चिम बंगाल पोस्टल सर्कल

Banking Jobs

भारतीय स्टेट बैंक State Bank of India(SBI) - 6100 पद - 26/07/2021 अंतिम तिथि - CRPD/APPR/2021-22/10

SSC Recruitment

कर्मचारी चयन आयोग Staff Selection Commission(SSC) - 25271 पद - 31/08/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 5215 पद - 22/06/2021 अंतिम तिथि

Jobs in Punjab

पंजाब स्टेट पावर कॉर्पोरेशन लिमिटेड Punjab State Power Corporation Limited (PSPCL) - 2632 पद - 20/06/2021 अंतिम तिथि

Jobs in Chhattisgarh

स्वास्थ्य सेवा निदेशालय, छत्तीसगढ़ Department of Health & Family Welfare, Chhattisgarh - 267 पद - 26/06/2021 अंतिम तिथि