CLA-11-03 Exam Question 6

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:
  • CLA-11-03 Exam Question 7

    What happens if you try to compile and run this program?
    #include <stdio.h>
    int *fun(int *t) {
    return t + 4;
    }
    int main (void) {
    int arr[] = { 4, 3, 2, 1, 0 };
    int *ptr;
    ptr = fun (arr - 3);
    printf("%d \n", ptr[2]);
    return 0;
    }
    Choose the right answer:
  • CLA-11-03 Exam Question 8

    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:
  • CLA-11-03 Exam Question 9

    What is the meaning of the following declaration?
    float ** p;
    Choose the right answer:
  • CLA-11-03 Exam Question 10

    What happens if you try to compile and run this program?
    #include <stdio.h>
    #include <stdlib.h>
    void fun (void) {
    return 3.1415;
    }
    int main (int argc, char *argv[]) {
    int i = fun(3.1415);
    printf("%d",i);
    return 0;
    }
    Choose the right answer: