C Operators Questions and Answers
Operators in C are symbols that perform operations on variables and values, forming the basis of all computational logic. Questions on C operators, including arithmetic, logical, relational, and bitwise operators, are common in programming questions and answers for campus placements and technical interviews. Companies like Infosys, Wipro, and TCS often include C operator problems in their online coding tests. This section provides in-depth C operator questions with solutions and explanations to help learners understand operator precedence, associativity, and expression evaluation.
C Operators
Showing 10 of
122 questions
121. Find the output. void main ( ) { char a= 'A'; if((a=='z')|| ((a='L') && (sizeof(a='\0'))))a=a; printf("%c",a); printf("Nothing"); }
- A Nothing
- Nothing
- L Nothing
- Z Nothing
122. Find the output int x=2, y=4; void main ( ) { int *p; p=&x; *p++=x<<2; *p=x; printf("%d %d", x, y); }
- 8 4
- 8 8
- 2 4
- 8 2