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
2. Bitwise operators are applicable only on
- Integers
- Integers and characters
- Integers and floats
- Integers, floats and double
3. Which operator enjoys the lowest priority from the group of operators ?
- Comma operator
- Conditional operator
- Assignment operator
- Unary operator
4. which operator is used both as an operators and a keyword?
- Right shifting operator
- Cast operator
- Sizeof operator
- Token pasting operator
6. Find the output. void main ( ) { int a=8, x; x=++a++a+++a; printf("%d, %d, x, a); }
- 33,11
- 24,11
- 24,5
- Compilation error
8. Which of the following operator has left to right associatively?
- Sizeof opeator
- Paranthesis
- Conditional operator
- Assignment operator
9. Find the output void main ( ) { int x,y; x=10; y=sizeof(++x); printf("x=%d y=%d", x,y); }
- x=10 y=2
- x=11 y=2
- Compilation error
- None of these
10. Find the output void main ( ) { int a,b,c=32; if (a==b==c) printf("dealhi challo"); else printf("d or die"); }
- delhi chaool
- do or die
- compile time error
- Runtime error