C Programming Interview Questions and Answers YASH PAL, 14 March 202228 June 2025 In this article, we are going to see some most important and basic to advanced C Programming Interview Questions and Answers. these questions are made based on the Interview preparation and for the preparation of competitive exams. also, these questions have a high probability that can be asked in your university exam or any coding competitions because these are general and most important questions that one needs to focus on to crack the Interview part related to C programming.C was primarily developed as asystems programming languagegeneral-purpose languagedata processing languagenone of the aboveAnswer – (1) system programming languageC is ahigh-level languagelow-level languagehigh-level language with some low-level featureslow-level language with some high-level featuresAnswer – (3) high-level language with some low-level featuresWhich of the following comments is not true?C provides no input-output featuresC provides no file access featuresC borrowed most of its ideas from BPClC provides no features to manipulate composite objects 1 only1,2 and 31,2,3 and 4 None of the aboveAnswer – (4) None of the aboveWhich of the following are not keywords in C?printfmainIFnone of the aboveAnswer – (3) IF C does no automatic array bound checking. this isnot true alwaysfalseC’s asset C’s shortcomings and always trueAnswer – (4) C’s shortcomings and always trueAny C programmust contain at least one functionneed not contain any functionneeds input datanone of the aboveAnswer – (1) must contain at least one functionPreprocessing is typically doneeither before or at the beginning of the compilation processafter compilation but before executionafter loadingnone of the aboveAnswer – (1) either before or at the beginning of the compilation processWhich of the following comments about the preprocessor directive # are correct?It converts the formal argument in the macro definition into a stringIt strips out redundant blanksIt concatenates adjacent strings if anyAll of the aboveAnswer – (4) All of the aboveIn a program, the constant is definedbefore mainafter mainanywhere, but starting on a new linenone of the aboveAnswer – (3) anywhere, but starting on a new lineChoose the correct statement:The use of goto enhances the logical clarity of a codeThe use of goto makes the debugging task easierUse goto when you want to jump out of a nested loopNever use gotoAnswer – (3) Use goto when you want to jump out of a nested loopWhich of the following about conditional compilation is not true?It is taken care of by the compiler.It is setting the compiler option conditionallyIt is Compiling a program based on a conditionIt is taken care of by the pre-processor.2 only3 and 4 only1 and 2all of the aboveAnswer – (2) 3 and 4 onlyThe minimum number of temporary variables needed to swap the contents of two variables is1230Answer – (4) 0The purpose of the following program fragmentb = s + b;s = b – s;b = b – s;wheres, be are two integers is totransfer the contents of s to btransfer the contents of b to sexchange(swap) the contents of s and bnegate the contents of s and bAnswer – (3) exchange(swap) the contents of s and bIf an integer needs two bytes of storage, then the maximum value of an unsigned integer is2^16 – 1 2^15 – 12^162^15Answer – (1) 2^16 – 1If an integer needs two bytes of storage, then the maximum value of a signed integer is2^16 – 1 2^15 – 12^162^15Answer – (2) 2^15 – 1Choose the false statements:An identifier may start with an underscoreAn identifier may end with an underscoreIF is a valid identifierThe number of significant characters in an identifier is implementation-dependentAnswer – (3) IF is a valid identifierint i = 5;is a statement in a C program. Which of the following is true?During execution, the value of i may change but not its addressDuring execution, both the address and value may changeRepeated execution may result in different addresses for ii may not have an associated addressAnswer – (3) Repeated execution may result in different addresses for iWhich of the following comments about the ++ operator are correct?It is a unary operatorThe operator can come before or after the operatorIf cannot be applied to an expression and it associated with the rightAll of the aboveAnswer – (4) All of the aboveFor the C preprocessor, which of the following is/are true?takes care of conditional compilationtakes care of macrostakes care of includes filesacts before compilation1 and 23 only1,2 and 3All of the aboveAnswer – (4) All of the aboveThe declaration enum cities [Bethlethem, Jericho, Nazareth = 1, Jerusalem] assign the value 1 toBethlehemNazarethBethlehem and NazarethJericho and NazarethAnswer – (4) Jericho and NazarethNote – More Questions and Answers will be added from time to time.Learn C ProgrammingC Programming tutorials with ExamplesPrepare for university exams and interviews c Computer Science Tutorials Interview questions answers computer scienceinterview preparation