Sreejobs Logo
   For Latest Job Updates  
sreenutech.com Online Exams
Home Govt Jobs IT Fresher Jobs IT Exp Jobs IT Walk-Ins MBA Jobs BPO Jobs Register FAQ’s Post Job Contact Us
Search:
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 20.
1)

Associativity has no role to play unless the precedence of operator is same.



2) What is the output of the program #include int main() { union a { int i; char ch[2]; }; union a u; u.ch[0] = 3; u.ch[1] = 2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; }


3)

Identify which of the following are declarations

1 :

extern int exe;

2 :

void square ( float x ) { ... }

3 :

double pow(double, double);



4)

Will the following code compile

void main()

{

int k=1;

printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");

}



5) What will be the output of the program? #include int main() { char j=1; while(j < 5) { printf("%d, ", j); j = j+1; } printf("\n"); return 0; }


6)

#include<stdio.h>

int main()

{

    int x = 10, y = 100%90, i;

    for(i=1; i<10; i++)

    if(x != y);

        printf("x = %d y = %d\n", x, y);

    return 0;

}

1 :

The printf() function is called 10 times.

2 :

The program will produce the output x = 10 y = 10

3 :

The ; after the if(x!=y) will NOT produce an error.

4 :

The program will not produce output.



7) What will be the output of the program? #include int main() { int k, num=30; k = (num>5 ? num <=10 ? 100 : 200: 500); printf("%d\n", num); return 0; }


8) What will be the output of the program? #include int main() { int i=-3, j=2, k=0, m; m = ++i || ++j && ++k; printf("%d, %d, %d, %d\n", i, j, k, m); return 0; }


9)

Will the following code compile

#include<stdio.h>

void main()

{

const int i=4;

float j;

j = ++i;

printf("%d %f", i,++j);

}



10)

void  main()

{

printf("\nab");

printf("\bsi");

printf("\rha");

}

Page 1 of 2
Home | Register for Job Updates | Contact Us