What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int i = 0;
printf ("%s", argv[i]);
return 0;
}
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:
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
#include
int main (int argc, char *argv[]) {
double x = 1234567890.0;
printf ("%f",x);
return 0;
}
Choose the most precise answer:
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
int i =2, j = 1;
if(i / j)
j += j;
else
i += i;
printf("%d",i + j);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
char *p = "John" " " "Bean";
printf("[%s]", p) ;
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#define ALPHA 0
#define BETA ALPHA-1
#define GAMMA 1
#define dELTA ALPHA-BETA-GAMMA
#include
int main(int argc, char *argv[]) {
printf ("%d", DELTA);
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 = 10 - 2 / 5 * 10 / 2 - 1;
printf("%d",i);
return 0;
}
Choose the right answer:
What happens if you try to compile and run this program?
#include
int main (int argc, char *argv[]) {
char i = 20 + 020 + 0x20;
printf("%d",i);
return 0;
}
Choose the right answer: