Quiz for C (Arithmetic Operators)
Q.1. Which header file is used to operate special math functions or keywords ?
Q.2. Which keyword is used to calculate power a number ?
Q.3. What does the operator i++ do ?
Q.4 If i=3 and a = ++i + i++ + --i, then what will be the value of a ?
Q.5. What does the modulus Operator(%) do ?
Q.6. Which function is used to find the Square-root of a number ?
Q.7. cbrt() is used to find the cube-root of a number.
Q.8. If a=10 and b=20, what will the value of 'a' and 'b' after following operation,
a = a + b;
b = a - b;
a = a - b;
a = a + b;
b = a - b;
a = a - b;
Q.9. If x = 7, y = 3, z = 9, then a = z * (x%y) / 4 + x , what will be the value of 'a' ?
Q.10. Which of the following correctly show thw hierarchy of arithmetic operations in C?
Q.11. How many type of decrement operator are there in C ?
Q.12. a = b++ , in this expression the value of b is first incremented and then it is assigned to 'a'.
Q.13. What will be the output of the following Code,
#include<stdio.h>
void main()
{
int a,b,c;
a = 10;
b = 15;
c = ++a - b + b++ + a++ - --b;
printf("%d %d %d",a,b,c);
}
Q.14. What will be the output of the following Code,
#include<stdio.h>
#include<math.h>
void main()
{
int x,y,z;
x = 10;
y = 15;
z = x * (y - x) %3;
int a = pow(z, 4);
printf("%d",a);
}
Q.15. What is the format specifier of double data-type in C ?
Instructions:-
- This Quiz is based on the basic concepts of C.
- Each correct answer will carry 2 points.
- The time limit for this Quiz is 420 seconds i.e. 7 minutes.
- The timer will start immediately after clicking on the start button.
- Once an option is selected you cannot select any other, So choose wisely.
- Do not refresh the page as it will reset the quiz.
- Once the time is up the quiz will automatically get submitted with number of questions responded.
- Your total score alongwith your name will be displayed after submission of the Quiz.
- Wish you ALL THE BEST. 👍👍
START
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP