C Programming MCQ Questions and Answers on Arithmetic Operators 2

Image

Learn C Programming MCQ Questions and Answers on C Arithmetic Operators like Modulo Division Operator, Plus, Minus, Star and Division Operators. Operator Precedence and Priority is also explained. Easily attend Job interviews after reading these Multiple Choice Questions.

Go through C Theory Notes on Arithmetic Operators before studying questions.



1) What is the Priority among (*, /, %), (+, -) and (=) C Operators.?
A) (*, /, %) >  (+, -) < (=)
B) (*, /, %) <  (+, -) < (=)
C) (*, /, %) >  (+, -) > (=)
D) (*, /, %) <  (+, -) (+, -) == (=)
Answer [=]
Answer[=]
2) What is the output of the C statement.?
int main()
{
    int a=0;
    a = 4 + 4/2*5 + 20;
    printf("%d", a);

    return 0;
}
A) 40
B) 4
C) 34
D) 54
Answer [=]
Answer[=]
3) What is the output of the C Program.?
int main()
{
    int a=0;
    a = 10 + 5 * 2 * 8 / 2 + 4;
    printf("%d", a);

    return 0;
}
A) 124
B) 54
C) 23
D) 404
Answer [=]
Answer[=]
4) What is the output of the C Program.?
int main()
{
    int a=0;
    a = 4 + 5/2*10 + 5;
    printf("%d", a);

    return 0;
}
A) 29
B) 5
C) 4
D) 34
Answer [=]
Answer[=]
5) What is the output of the C Program.?
int main()
{
    int a=0;
    a = 10 + 2 * 12 /(3*2) + 5;
    printf("%d", a);

    return 0;
}

A) 31
B) 19
C) 11
D) 29
Answer [=]
Answer[=]
6) What is the output of the C Program.?
int main()
{
    int a=0;
    a = 10 + 2 * 12 / 3 * 2 + 5;
    printf("%d", a);

    return 0;
}
A) 19
B) 31
C) 11
D) 25
Answer [=]
Answer[=]
7) What is the output of the C Program.?
int main()
{
    float a=10.0;
    a = a % 3;
    printf("%f", a);

    return 0;
}
A) 0
B) 1
C) 1.000000
D) Compiler error.
Answer [=]
Answer[=]


 

8) What is the output of the C Program.?
int main()
{
    float a=10.0;
    a = (int)a % 3;
    printf("%f", a);

    return 0;
}
A) 0
B) 1
C) 1.000000
D) Compiler Error.
Answer [=]
Answer[=]
9) What is the output of the C Program.?
int main()
{
    int a=0;
    a = 14%-5 - 2;
    printf("%d", a);

    return 0;
}
A) 0
B) -4
C) -2
D) 2
Answer [=]
Answer[=]
10) What is the output of the C Program.?
int main()
{
    int a= 3 + 5/2;
    printf("%d", a);

    return 0;
}
A) 3
B) 2
C) 5
D) Can not assign an expression to variable at the time of declaration.
Answer [=]
Answer[=]


Like or Share

Show some care. Like or Subscribe. [FB]...[Youtube]

C MCQ App by ExamTray 

Android APP

Java MCQ App by ExamTray 

Android APP
ALL MCQ App by ExamTray Android APP

Ad

 

Some good C Books

Book Price
1. C: The Complete Reference  Check Price
2. Let Us C Check Price
3. Programming in ANSI C Check Price
4. The C Programming Language Check Price

We may get some affiliate commission for the above purchases.