1.
What is the output of the following C code, if it is executed from the command line:
cmd> gcc sample.c
cmd> ./a.out 1 2 3
* sample.c *
 
#include

int main(int argc, char * argv[]) {
    int j;
    j = argv[1] + argv[2] + argv[3];
    printf("%d", j);
    return 0;
}
2.
In C, which of these is the correct declaration of the following scenario:
An array of three pointers to chars.
3.
What is the meaning of the following C declaration:
void *cmp();
4.
What is the output of the following C code:
 
#include
typedef unsigned long int uli;
typedef uli u;
int main() {
    uli a;
    u b = -1;
    a = -1;
    printf("%lu, %lu", a, b);
    return 0;
}
5.
What is the output of the following C code:
 
#include
# define x 5 + 2

int main() {
    int i;
    i = x * x * x;
    printf("%d", i);
}
6.
What is the output of the following C code:
 
#include

void main() {
    int x = 20, y, z;
    y = x = 10;
    z = x < 20;
    printf("%d, %d, %d", z, x, y);
}
7.
What is the output of the following C code:
 
#include

void main() {
    int x = 6, y = 4, z;
    z = x++ + --y;
    printf("%d", z);
}
8.
What is the output of the following C code snippet:
#include
int * f();
int main() {
    int * p = f();
    printf("%d
", * p);
}
int * f() {
    int * j = (int * ) malloc(sizeof(int));
    * j = 10;
    return j;
}
9.
Which of these statements about the following C code is correct:
const int *ptr;
10.
Which of the following keyword is used to transfer control from a specific function back to the calling function?