ExamVeda
Login
Home
21
In C, what is the purpose of the 'inline' keyword when used with a function?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
22
What is a function parameter in C?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
23
What is the result of the expression ceil(3.2) in C, assuming proper inclusion of the math library?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
24
In C, what is the purpose of the 'const' keyword when used with a function parameter?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
25
How can you declare a function in C that takes a variable number of arguments?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
26
In C, what is the purpose of the 'recursion' in a function?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
27
What is the result of the expression pow(2, 3) in C, assuming proper inclusion of the math library?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
28
What is the purpose of the 'volatile' keyword when used with a function in C?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
29
What is the result of the expression abs(-7.5) in C?
Discuss
Answer & Solution
Answer: Option D
Solution:
In C, the function abs() is defined in stdlib.h and is used to compute the absolute value of an integer.

Passing a floating-point number like -7.5 to abs() is incorrect because abs() expects an int argument.

To handle floating-point numbers, C provides a different function called fabs(), which is defined in math.h.

Therefore, using abs(-7.5) results in a compile-time error or unexpected behavior because the argument type does not match the function's expected parameter.

Option A and B are incorrect because abs() cannot legally process a float.

Option C is incorrect because while 7 is the integer part, the input is still a float and would not be accepted by abs().

Hence, the correct answer is Option D: Error.
30
In C, what is a function parameter's scope?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board