C Language Interview Questions and Answers - 4
Question: 16
Can array subscripts have negative value in C?
No. Array subscripts should not have negative value. Always, it should be positive.
Question: 17
What is pragma in C?
#pragma is a pre processor macro in C.
It is used to call a function before and after main function in a C program.
Question: 18
What is null pointer in C?
Null pointer is a pointer which is pointing to nothing. Null pointer points to empty location in memory.
Value of null pointer is 0. We can make a pointer to point to null as below.
int * p = NULL;
char * p = NULL;
Question: 19
What is the difference between= and== operator?
Where = is an assignment operator and == is a relational operator.
Example:
while (i=5) is an infinite loop because it is a non zero value and
while (i==5) is true only when i=5.
Question: 20
What is the difference between printf(), sprintf() and fprintf()?
printf() is used to print the text or value of the variable in the screen .
sprintf() is used to store the values in the character array or string.
fprintf() is used to store the values of variable in the file.
- Top 500+ C Language Interview Questions and Answers Pdf
- C Language Interview Questions and Answers
- C Language Interview Questions and Answers for Freshers
- C Language Interview Questions and Answers for Experienced
- C Programming Interview Questions and Answers
- Embedded C Interview Questions and Answers Pdf
- Top 200+ Advanced C Language Interview Questions 2020-2021
- C Programming Question Bank with Answers Pdf
- C Programming Interview Questions and Answers for Freshers
- C Programming Interview Questions and Answers for Experienced
- C Programming Basics Questions and Answers Pdf
- 1000+ Advanced C Programming Interview Questions & Answers
- 1000+ C Interview Questions and Answers 2023 - 2024 Pdf
- 1000+ C Programming Coding Questions and Answers
- 1000+ C Basic Interview Questions for Freshers Pdf
- 1000+ C Questions and Answers Pdf
Samacheer Kalvi Class 10 Science Acoustics Questions & Answers More
Agricultural Engineering Multiple Choice Questions and Answers Pdf More
Soil, Water Conservation Engineering, Hydrology, Surveying MCQ Questions More
Irrigation and Drainage Engineering, Wells & Pumps MCQ Questions Pdf More
Agricultural Engineering Farm Power MCQ Questions and Answers More
1000+ Single Phase Induction Motors MCQ Questions and Answers Pdf More
1000+ TNPSC Group 2 General English Question Paper with Answers More
100+ Bar Graph Questions and Answers Pdf More
Top 50+ Atmospheric Temperature and Pressure MCQS with Answers More
Computer Awareness for GATE, SSC, UPSC, Banking, Railway Questions More