QUESTION 1 #include int main() { int i = 4; if(i == 4) i = 5; else if (i == 5) printf("here"); return 0; } a. None of the other answers are correct. b. Hello World! c. here d. hereherehereherehereherehereherehere (...repeating) e. (No output) QUESTION 2 #include int main(void){ int j = 0; if(j == 0) { printf("j = %d\n",j++); printf("j = %d\n",j); } return(0);} a. j = 0 j = 1 b. None of the other answers are correct. c. j =1 j = 1 d. Nothing e. j = 1 j = 1 j = 2 j = 2 ....and so on QUESTION 3 #include int main(void){ int a = 3, b=0; if(!b && (a%3)==0) ++b; printf("%d %d",a,b); return(0); } a. 0 1 b. 0 0 c. 3 0 d. None of the other answers are correct. e. 3 1 QUESTION 4 What is the logical value of the following expression? 2 < 5 < 3; True False 10 points
QUESTION 1
-
#include <stdio.h>
int main() {
int i = 4;
if(i == 4)
i = 5;
else if (i == 5)
printf("here");
return 0;
}a. None of the other answers are correct.
b. Hello World!
c. here
d. hereherehereherehereherehereherehere (...repeating)
e. (No output)
QUESTION 2
-
#include <stdio.h>
int main(void){ int j = 0;
if(j == 0) { printf("j = %d\n",j++); printf("j = %d\n",j); }
return(0);}a. j = 0
j = 1
b. None of the other answers are correct.
c. j =1
j = 1
d. Nothing
e. j = 1
j = 1
j = 2
j = 2
....and so on
QUESTION 3
-
#include<stdio.h>
int main(void){int a = 3, b=0;
if(!b && (a%3)==0) ++b;
printf("%d %d",a,b);
return(0);}
a. 0 1
b. 0 0
c. 3 0
d. None of the other answers are correct.
e. 3 1
QUESTION 4
-
What is the logical value of the following expression?
2 < 5 < 3;
True
False
10 points
QUESTION 5
-
What is the logical value of the following expression?
9 && !4;
True
False
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images