Exponentiation operation in C is carried out as
a = pow (3, 2)
C has no exponentiation operator at all — the job is done by a library function, pow(), option 3.
#include <math.h>double pow(double base, double exponent);
so pow(3, 2) returns 9.0.
| Option | What it actually is |
|---|---|
3 ** 2 | Parsed as 3 * (*2) — a dereference of 2. Syntax error |
3 ^ 2 | Bitwise XOR — gives 1, silently |
pow(3, 2) | ✓ Correct |
3 exp(2) | Not valid syntax; exp(x) computes ex |
Option 2 is the dangerous one and the real subject of the question. In many languages ^ means "raised to the power", but in C it is the bitwise exclusive-OR. The expression compiles without complaint and produces a wrong answer:
\(3=011_{2},\quad 2=010_{2},\quad 3\oplus2=001_{2}=1\)
A silent wrong result is far worse than a compile error, which is why this particular confusion is worth remembering.
Option 1 fails for a related reason. C has no ** token; the parser sees two separate * operators, and the second is read as a pointer dereference applied to the integer 2 — meaningless, so it is rejected at compile time.
Two practical cautions about pow().
It works in floating point. Both arguments and the return value are double, so pow(10, 2) may come back as 99.999999 and truncate to 99 when assigned to an int. Round explicitly, or use integer multiplication where the exponent is a small constant — x * x is both exact and much faster than pow(x, 2).
It needs its header and its library. Omitting <math.h> lets older compilers assume a return type of int, giving nonsense; and on Unix-like systems the maths library must be linked with -lm.
Hence, exponentiation is carried out as pow(3, 2).
The function "isalnum( )" returns a non-zero value if the character is alphanumeric and zero otherwise. What is header file to be used in the main program ?
To read a integer variable, find the correct format given below :
Int m;
Find the correct list, which is the reverse (at all levels) of the given list :
[[4, 7, 8], 2, 9, [19, 6], 20, 3]
(i) 3, 20
(ii) 9, 2
(iii) [6, 19]
(iv) [8, 7, 4]
Which of the following is not an infinite loop ?
(A) int i = 1;
while (1)
{
i++ ;
}
(B) for ( ; ; ) ;
(C) int t = 0, f ;
while (t)
{
f = 1;
}
(D) int y, x = 0 ;
do
{
y = x;
}
while (x == 0);
The three types of loops available in C language are
i. for
ii. while
iii. do-while
Which loops do not operate without testing the condition even once ?
Match the following :
| List – I | List – II |
| a. associativity | i. memory storage |
| b. # define | ii. if-then-else |
| c. auto | iii. operators with equal precedence |
| d. conditional operator | iv. define operator |
Codes :
Assertion (A) : 'C' uses many data types such as integers (short and long) and float etc.
Reason (R) : Conversion specifier used for short unsigned integer is % lu.
Which bitwise operator is suitable for turning off a particular bit in a number ?
Which storage class is used for the variables that are often required in a program ?
Which is not a proper way of array declaration ?
Read the given figure and find the region representing persons who are educated and employed but not confirmed in job.

The magazine in which Mahatma Gandhi mentioned what he wanted the Constitution to do is:
Which gas shields the surface of the earth from ultraviolet radiation from the sun?
Which event is marked as an Intangible Cultural Heritage of Humanity by UNESCO?
Who has been conferred with the rank of the Commander of the Order of the British Empire in 2018?