Quiz for C (Arithmetic Operators)

Time left: 420 seconds

Q.1. Which header file is used to operate special math functions or keywords ?

#include<iostream.h>
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
Q.2. Which keyword is used to calculate power a number ?

power(base,expo)
pow(base,expo)
power("base", "expo")
power("%d %d", base, expo)
Q.3. What does the operator i++ do ?

Increment the value of i by 2
Increment the value of i by 1
Q.4 If i=3 and a = ++i + i++ + --i, then what will be the value of a ?

16
9
8
12
Q.5. What does the modulus Operator(%) do ?

Divides two number and gives quotient as Output
Divides two number and gives dividend as Output
Calculates the perncentage
Divides two number and gives Remainder as Output
Q.6. Which function is used to find the Square-root of a number ?

squareroot()
square_root()
sqrt()
sqtr()
Q.7. cbrt() is used to find the cube-root of a number.

True
False
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 = 30 and b = 10
a = 20 and b = 10
a = 10 and b = 20
a = 10 and b = 10
Q.9. If x = 7, y = 3, z = 9, then a = z * (x%y) / 4 + x , what will be the value of 'a' ?

9
10
7
11
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 ?

1
2
3
4
Q.12. a = b++ , in this expression the value of b is first incremented and then it is assigned to 'a'.

True
False
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);
}


12 16 22
16 12 7
12 15 7
11 7 15
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);
}


12
15
8
16
Q.15. What is the format specifier of double data-type in C ?

%Lf
%d
%dl
%lf

Instructions:-

  1. This Quiz is based on the basic concepts of C.
  2. Each correct answer will carry 2 points.
  3. The time limit for this Quiz is 420 seconds i.e. 7 minutes.
  4. The timer will start immediately after clicking on the start button.
  5. Once an option is selected you cannot select any other, So choose wisely.
  6. Do not refresh the page as it will reset the quiz.
  7. Once the time is up the quiz will automatically get submitted with number of questions responded.
  8. Your total score alongwith your name will be displayed after submission of the Quiz.
  9. Wish you ALL THE BEST. 👍👍

START

Results:-

Hi






Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post