What will be output when you will execute following c code?#include enum actor { SeanPenn= AlPacino=- GaryOldman, EdNorton};void main() { enum actor a= switch(a) { case SeanPenn: printf("Kevin Spacey"); break; case AlPacino: printf("Paul Giamatti"); break; case GaryOldman:printf("Donald Shuterland"); break; case EdNorton: printf("Johnny Depp"); } }
Kevin Spacey
Paul Giamatti
Donald Shuterland
Johnny Depp
Q.3.
The output of the code below is #include int *m() { int *p = return p; } void main() { int *k = m(); printf("%d", k); }
5
Junk value
0
Error
Q.4.
Macro flowchart is also called as
Less Detail flowchart
More detail flowchart
Simple detailed flowchart
None of the above
Q.5.
What is the output of C Program.? int main() { int a=do { printf("%d ", a); a++; if(a >break; }while(1); return}
No Output
32 33 34
32 33 34 35
Compiler error
Q.6.
A source program is the program written in which level language ?
Alpha Numeric
High-Level
Symbolic
Machine
Q.7.
What will the result of 'num' variable after execution of the following statements?int num = num % = 11;
3
5
8
11
Q.8.
Choose a correct C Statement.
a++ is (a=a+1) POST INCREMENT Operator
a-- is (a=a-1) POST DECREMENT Operator--a is (a=a-1) PRE DECREMENT Operator
++a is (a=a+1) PRE INCREMENT Operator
All the above.
Q.9.
Which one of the following is a loop construct that will always be executed once?
for
while
switch
do while
Q.10.
What is the way to suddenly come out of or Quit any Loop in C Language.?
continue; statement
break; statement
leave; statement
quit; statement
Q.11.
Loops in C Language are implemented using.?
While Block
For Block
Do While Block
All the above
Q.12.
What is math.floor(3.6)?
6
3
3.5
0.6
Q.13.
We want to round off x, a Float to an Int value. The correct way to do so would be
Y = ( int ) ( x + 0.5 ) ;
Y = int ( x + 0.5) ;
Y = ( int ) x + 0.5;
Y = ( int ) ( ( int ) x + 0.5 )
Q.14.
Give the following declarations and an assignment statement. Which one is equivalent to the expression str [4]?char str[80]; char * p; p = str;
p + 4
*p + 4
*(p + 4)
p[3]
Q.15.
What will the result of num1 variable after execution of the following statements?int j =num1 = while (++j <= { num1++; }
11
12
13
14
Q.16.
Directives are translated by the
Pre-processor
Compiler
Linker
Editor
Q.17.
The coding or scrambling of data so that humans cannot read them, is known as _____.
Compression
Encryption
Ergonomics
Biometrics
Q.18.
What is the output of C Program.?int main() { int a=while(a <={ printf("%d ", a); a++; } return}
25 25 25
25 26 27
27 27 27
Compiler error
Q.19.
Methods declared as what cannot be overriden?
Transcient
Abstract
Final
Super
Q.20.
In programming, repeating some statements is usually called ?
Running
Structure
Looping
Control structure
Support mcqgeeks.com by disabling your adblocker.
Please disable the adBlock and continue. Thank you.