Dear Reader, Inspite of technical strengths and favoured subjects, one are where you can always at least a couple of questions is C programming concepts. Below are few questions to test your knowledge in C.
Which of the following is true about C ?
a. C can be used on a large number of platforms ranging from microcontrollers to high end Operating Systems
b. C employs bytecode and is as portable as JAVA
c. C cannot be used on any of the microcontrollers.
d. Both a and b.
Answer : a. C can be used on a large number of platforms ranging from microcontrollers to high end Operating Systems
Reason : It is a well known fact that C is super efficient and can run on several platforms ranging from microcontrollers to high end operating systems. Option b is not true as C does not employ any bytecode execution as JAVA does. Option c is certainly false. Hence Option a is the correct answer.
Which of the following is false about C ?
a. C++ compilers generally can compile C programs as well.
b. C programs executables are native code to the OS where they are being executed.
c. C has data structures that give some degree of OOP functionality of C.
d. For any application resource usage of C is always lesser that of C++
Answer : d. For any application resource usage of C is lesser that of C++
Reason : Option d is a vague statement which does not give any specific about the type of application, type of data structures used etc. Resource usage depends upon a lot of factors and not just the programming language employed. Hence option d is false.
Which of the following is not a rule/convention followed on C programs before compilation ?
a. C programs are saved with extension .c
b. C programs need to be saved in same directory as that of compiler.
c. All required header files need to be included before compilation to avoid errors.
d. None of the above.
Answer : b. C programs need to be saved in same directory as that of compiler.
Reason : Saving C programs to same directory as compiler is absolutely not required. It can be saved on any folder of user's choice. Hence option b is not a rule/convention when sending C programs to compilation. Options a and b are to be followed and hence they cannot be ignored.
Are You Preparing Seriously For 2015 Placement Tests?
Click Here To Know What Placement Success Book (Hard Copy) Contains & Know How To Order This Book