Q.1.
Main() { char *p; p = "Hello"; printf ("%cn", *&*p); }
Q.2.
Main() { char s[ ] = "man"; int i; for( i=s[ i ]; i++) printf( "n%c%c%c%c", s[ i ], *(s+i), *(i+s), i[s] ); }
Q.3.
What is the output of this C code?    #include     int main()    {        int a =b =       switch (a)        {        case a*b:            printf("yes ");        case a-b:            printf("non");            break;        }    }
Q.4.
Which of the following is not a valid escape code?
Q.5.
#define clrscr()main() { clrscr(); printf( "%dn", clrscr() ); }
Q.6.
Enum colors {BLACK,BLUE,GREEN} main() { printf( "%d..%d..%d", BLACK, BLUE, GREEN ); return(1); }
Q.7.
What will be output when you will execute following c code?#include void main() {    signed int a = -   unsigned int b = -1u;    if(a == b)         printf( "The Lord of the Rings" );    else         printf( "American Beauty" );}
Q.8.
Public abstract interface Frobnicate { public void twiddle(String s); }  Which is a correct class?
Q.9.
How many times i value is checked in the below code?        #include         int main()        {            int i =           do {                i++;                printf( "In while loopn" );            } while (i < 3);        }
Q.10.
What is the output of this C code?        #include         void main()        {            int x =z =           int y = x
Q.11.
Output of the Program : main() { int i =while (i goto here;          i++;      } } fun() { here : printf( "PP" ); }
Q.12.
Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?
Q.13.
What will be output of the following c program ? #include int main() {     int max-val=    int min-val=    int avg-val;     avg-val =( max-val + min-val ) /    printf( "%d", avg-val );     return}
Q.14.
What will be output of following program ? #includeint main() { int a = 10;void *p = &a;int *ptr = p;printf("%u",*ptr);return}
Q.15.
What is the result after execution of the following code if a isb isand c is 10?
Q.16.
What will output when you compile and run the following code?#include struct student{ int roll;int cgpa;int sgpa[8]; }; void main(){ struct student s = { 12,8,7,2,5,9 };int *ptr;ptr = (int *)&s;clrscr();printf( "%d", *(ptr+);getch(); }
Q.17.
What would be the output of the following program ? main() {      const int x =       int *ptrx;       ptrx = &x;       *ptr =       printf ("%d", x); }
Q.18.
What will be output of following program?#include int main() {   void (*p)();   int (*q)();   int (*r)();   p = clrscr;   q = getch;   r = puts;  (*p)();  (*r)("www.sawaal.com");  (*q)();  return 0;}
Q.19.
If the following program (myprog) is run from the command line as  myprog 1 2what would be the output? main(int argc, char *argv[]) {     int i, j =    for (i =i < argc ; i++)            j = j + atoi ( argv[i]);     printf ("%d", j); }
Q.20.
What would be the output of the following program ? main()  {        unsigned  int a = oxffff;         ~a;         printf ("%x", a); }