C - Operators

page 1 out of 4

page 1 out of 4


Question 1     

What value of c will get printed

main()
{
int a,b,c;
a=10;
b=20;
c=printf("%d",a)+ ++b;
printf("%d",c);
}





Question 2     

what is the output of following program?

void main(){
float a;
a=6.7;
if(a==6.7)
printf("A");
else
printf("B");
}





Question 3     

what is the output of following program?

void main(){
int a=1;
void xyz(int , int);
xyz(++a,a++);
xyz(a++,++a);
printf("%d",a);
}
void xyz(int x, inty){
 printf("%d%d",x,y);
}





Question 4     

what is the output of following program?

void main(){
int a;
a=100;
printf("%d%d",++a,a++);
}





Question 5     

What is the output of the following program?

void main(){
int a;
a=10;
while(a++<=15)
printf("%d",a);
printf("%d",a+10);
}





Question 6     

Assuming, integer is 2 byte, What will be the output of the program?

#include<stdio.h>

int main()
{
      printf("%x\n", -1>>1);
      return 0;
}





Question 7     

What will be the output of the program ?

#include<stdio.h>

int main()
{
        int i=3, *j, k;
        j = &i;
       printf("%d\n", i**j*i+*j);
       return 0;
}





Question 8     

Which of the following special symbol allowed in a variable name?






Question 9     

Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&






Question 10     

what will be output of the program?

void main()
{
    printf("value is =%d",(10++));
}




page 1 out of 4

page 1 out of 4


Sign Up Page

Oops!!

To view the solution need to Login



Score : 0 / 0
L
o
a
d
i
n
g
.
.
.