Question
QUESTION 7 What gets printed (if anything) on execution of following C statements? int j = 5 ; ( ! (j != 1) ? printf
QUESTION 7
-
What gets printed (if anything) on execution of following C statements?
int j = 5 ;
( ! (j != 1) ? printf ( " Today") : printf ( " Exam1") ) ;
A. Today
B. Exam1
C. Compiler-time Error
D. Run-time Error
-
QUESTION 9
-
What will be the values of variables x, y, z after following statements are executed in a C Program?
int x = 7, y = 6, z ;
z = x-- -y ;
printf ( " %d %d %d", x, y, z ) ;
A. 6 6 0
B. 7 6 1
C. 6 6 1
D. 7 6 0
-
QUESTION 11
-
What will be the output of the following code snippet?
for(;;)
printf("Hello ");
A. Prints "Hello " infinitely.
B. Prints "Hello " once.
C. No output
D. Compile-time Error
-
3 points
QUESTION 12
-
What will be the output of the following program?
#include
void fun()
{
static int i;
i=0;
++i;
printf("%d",i);
}
int main()
{
fun();
fun();
fun();
return 0;
}
A. 1 2 3
B. 3 2 1
C. 1 1 1
D. 0 0 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started