C Set1
C Set1
C Set1
ANS:B
www.cgpabooster.in
Academic Lab: CGPA Booster
3. Variable name resolution (number of significant
characters for the uniqueness of variable) depends on
___________
a) Compiler and linker implementations
b) Assemblers and loaders implementations
c) C language
d) None of the mentioned
ANS:A
www.cgpabooster.in
Academic Lab: CGPA Booster
c) const keyword is used to define constant values
d) You cannot reassign a value to a constant variable
ANS:A
6. Which of the following statement is false?
a) A variable defined once can be defined again with
different scope
b) A single variable cannot be defined with two different
types in the same scope
c) A variable must be declared and defined at the same
time
d) A variable refers to a location in memory
ANS:C
www.cgpabooster.in
Academic Lab: CGPA Booster
a) Compile time error
b) 9
c) 8
d) Run time error
ANS:A
UNIT-2
www.cgpabooster.in
Academic Lab: CGPA Booster
a) inside if
b) inside else if
c) inside else
d) compile time error
ANS:C
}
a) The control won’t fall into the for loop
b) Numbers will be displayed until the signed limit of
short and throw a runtime error
c) Numbers will be displayed until the signed limit of
short and program will successfully terminate
d) This program will get into an infinite loop and keep
printing numbers with no errors
ANS:C
UNIT-3
1. What will be the output of the following C code?
#include <stdio.h>
void main()
{
m();
void m()
{
printf("hi");
}
}
a) hi
b) Compile time error
c) Nothing
d) Varies
ANS:B
www.cgpabooster.in
Academic Lab: CGPA Booster
5. register keyword mandates compiler to place it in
machine register.
a) True
b) False
c) Depends on the standard
d) None of the mentioned
ANS:B
www.cgpabooster.in
Academic Lab: CGPA Booster