What happens if you try to compile and run this program?

Assume that ints are 32-bit wide. What happens if you try to compile and run this program? #include <stdio.h> typedef union { int i; int j; int k; } uni; int main (int argc, char *argv[]) { uni s; s.i = 3; s.j = 2; s.k = 1; printf("%d",s.k *...

May 5, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> 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:A . The program outputs...

April 29, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main(int argc, char *argv[]) { int i = 10 - 2 / 5 * 10 / 2 - 1; printf("%d",i); return 0; } Choose the right answer:A . The program outputs 0B . The program outputs...

April 4, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main (int argc, char *argv[]) { char *t = "abcdefgh"; char *p = t + 2; int i; p++; p++; printf("%d ", p[2] - p[-1]); C++ Institute - CLA-11-03 return 0; } Choose the right answer:A...

April 1, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main(int argc, char *argv[]) { int i = 10 - 2 / 5 * 10 / 2 - 1; printf("%d",i); return 0; } Choose the right answer:A . The program outputs 0B . The program outputs...

March 26, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? enum { A, B, C, D, E, F }; #include <stdio.h> int main (int argc, char *argv[]) { printf ("%d", B + D + F); return 0; } Choose the right answer:A . The program outputs 10B . The...

March 25, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main(int argc, char *argv[]) { int i = 10 - 2 / 5 * 10 / 2 - 1; printf("%d",i); return 0; } Choose the right answer:A . The program outputs 0B . The program outputs...

March 25, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main(int argc, char *argv[]) { int i = 10 - 2 / 5 * 10 / 2 - 1; printf("%d",i); return 0; } Choose the right answer:A . The program outputs 0B . The program outputs...

March 19, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

Exams Prep What happens if you try to compile and run this program? #include <stdio.h> int main (int argc, char *argv[]) { int i = 'A' - 'B'; int j = 'b' - 'a'; printf("%d",i / j); return 0; } Choose the right answer:A . Execution failsB . Compilation failsC...

March 18, 2025 No Comments READ MORE +

What happens if you try to compile and run this program?

What happens if you try to compile and run this program? #include <stdio.h> int main(int argc, char *argv[]) { int i = 10 - 2 / 5 * 10 / 2 - 1; printf("%d",i); return 0; } Choose the right answer:A . The program outputs 0B . The program outputs...

March 13, 2025 No Comments READ MORE +