What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int main, Main, mAIN = 1;
Main = main = mAIN += 1;
printf ("%d", MaIn) ;
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
#include <string.h>
struct STR {
int i;
char c[20];
float f;
};
int main (int argc, char *argv[]) {
struct STR str = { 1, "Hello", 3 };
printf("%d", str.i + strlen(str.c));
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
#include <string.h>
int main (int argc, char *argv[]) {
int a = 0, b = 1, c;
c = a++ && b++;
printf("%d",b);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
int main(int argc, char *argv[]) {
int i = 2 / 1 + 4 / 2;
printf("%d",i);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
int f1(int n) {
return n = n * n;
}
int f2(int n) {
return n = f1(n) * f1(n);
}
int main(int argc, char ** argv) {
printf ("%d \n", f2(1));
return 0;
}
-
Select the correct answer:
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
float f = 1e1 + 2e0 + 3e-1;
printf("%f ",f);
return 0;
}
Choose the right answer:
What happens when you compile and run the following program?
#include
int fun(void) {
static int i = 1;
i++;
return i;
}
int main (void) {
int k, l;
k = fun ();
l = fun () ;
printf("%d",l + k);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int i = 7 || 0 ;
printf("%d", !! i);
return 0;
}
Choose the right answer:
What is the meaning of the following declaration?
float ** p;
Choose the right answer:
Assume that ints are 32-bit wide.
What happens if you try to compile and run this program?
#include
typedef struct
int i;
int j;
int k;
} str;
int main (int argc, char *argv[]) {
str s = { 7, 7, 7 };
printf ("%d", sizeof (s.s));
return 0;
}
Choose the right answer:
PDF + Testing Engine
|
---|
$57.75 |
Testing Engine
|
---|
$43.75 |
PDF (Q&A)
|
---|
$36.75 |
C++ Institute Free Exams |
---|
![]() |