Detailed Answers| 100% A+ Grade
What must every C program have? - ✔✔✔ ANSWER-Main
Every statement in C must end with a... - ✔✔✔ ANSWER-semicolon(;)
What will be the value of d in the following program?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = b + (c==a);
printf("%d", d);
} - ✔✔✔ ANSWER-5
because it would be:
d = 5 + (5=10)
d = 5 + F or d = 5 + 0
d = 5 :)
,What will be the value of f in the following program?
#include <stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
float f;
f = b*1.0 + c / a;
printf("%f", f);
} - ✔✔✔ ANSWER-5.000000
Which of the following if statements is syntactically Correct?
a. if x = 3 x++;
b. if (3=x), x++;
c. if (3==x), x++;
d. if (x==3 ++x);
e. if (x++ ==3) x++; - ✔✔✔ ANSWER-E
In the language of "C", a false condition is evaluated to...? - ✔✔✔
ANSWER-zero (0)
Consider the partial code;
, int a = 0;
int b = 1;
int c = -1;
if (!c) printf("%d", b);
What is printed by this code? - ✔✔✔ ANSWER-Nothing is printed
Consider the partial code:
int a = 1, b = 0, c = -1, d = -2;
if (a < c) printf("less");
if (a > b) printf("more");
if (a != d) printf("not equal");
What is printed by this code? - ✔✔✔ ANSWER-more not equal
In a flowchart, what is the shape of the decision symbol? - ✔✔✔
ANSWER-diamond
What is wrong with the following loop?
While (sum <= 1000) {sum = sum + 30;} - ✔✔✔ ANSWER-While
should be while (should not be capitalized)