Units

### Unit: Arithmetic Operators - Questions and Answers

Practice these Arithmetic Operators under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Arithmetic Operators for following purpose.

– Anyone who is wishing to increase their perfect knowledge of Arithmetic Operators of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Arithmetic Operators.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Arithmetic Operators under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Arithmetic Operators topic of C Programming:

1.

What is the value of x in this C code?

1. `    #include <stdio.h>`
2. `    void main()`
3. `    {`
4. `        int x = 5 * 9 / 3 + 9;`
5. `    }`

Explanation:

2.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int i = -3;`
5. `        int k = i % 2;`
6. `        printf("%d\n", k);`
7. `    }`

Explanation:

3.

Which among the following are the fundamental arithmetic operators, ie, performing the desired operation can be done using that operator only?

Explanation:

4.

The precedence of arithmetic operators is (from highest to lowest)

Explanation:

5.

Which of the following data type will throw an error on modulus operation(%)?

Explanation:

6.

What is the output of this C code?

1. `   #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int i = -5;`
5. `        i = i / 3;`
6. `        printf("%d\n", i);`
7. `        return 0;`
8. `    }`

Explanation:

7.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    void main()`
3. `    {`
4. `        int y = 3;`
5. `        int x = 5 % 2 * 3 / 2;`
6. `        printf("Value of x is %d", x);`
7. `    }`

Explanation:

8.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int a = 10, b = 5, c = 5;`
5. `        int d;`
6. `        d = a == (b + c);`
7. `        printf("%d", d);`
8. `    }`

Explanation:

9.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    void main()`
3. `    {`
4. `        int a = 3;`
5. `        int b = ++a + a++ + --a;`
6. `        printf("Value of b is %d", b);`
7. `    }`

Explanation:

10.

Which of the following is not an arithmetic operation?

Explanation:

11.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int a = 10;`
5. `        double b = 5.6;`
6. `        int c;`
7. `        c = a + b;`
8. `        printf("%d", c);`
9. `    }`

Explanation:

12.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int i = 3;`
5. `        int l = i / -2;`
6. `        int k = i % -2;`
7. `        printf("%d %d\n", l, k);`
8. `        return 0;`
9. `    }`

Explanation:

13.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    void main()`
3. `    {`
4. `        int x = 5.3 % 2;`
5. `        printf("Value of x is %d", x);`
6. `    }`

Explanation:

14.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    int main()`
3. `    {`
4. `        int i = 5;`
5. `        i = i / 3;`
6. `        printf("%d\n", i);`
7. `        return 0;`
8. `    }`