Important C Interview questions
Quick Revision Summary
1 How do you write a program which produces its own source code as its output? 2. How can I find the day of the week given the date? 3. Why doesn’t C have nested functions? 4. W...
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation
1
How do you write a program which produces its own source code as its output?
2. How can I find the day of the week given the date?
3. Why doesn’t C have nested functions?
4. What is the most efficient way to count the number of bits which are set in a value?
5. How can I convert integers to binary or hexadecimal?
6. How can I call a function, given its name as a string?
7. How do I access command-line arguments?
8. How can I retu
multiple values from a function?
9. How can I invoke another program from within a C program?
10. How can I access memory located at a certain address?
11. How can I allocate arrays or structures bigger than 64K?
12. How can I find out how much memory is available?
13. How can I read a directory in a C program?
14. How can I increase the allowable number of simultaneously open files?
15. What’s wrong with the call fopen(”c:
ewdir\file.dat”, “r”)?
Interviewer Evaluation Points & Scoring Rubric
- 1 Structure answer clearly: Core concept, Practical example, and Pitfalls to avoid.
- 2 Demonstrate clear communication without unnecessary buzzwords.
- 3 Relate concept to real-world software development scenarios.