A) * (asterisk)
B) | (pipeline)
C) - (hyphen)
D) _ (underscore)
Correct Option - D
ExplanationVariable names in C are made up of letters (upper and lower case) and digits. The underscore character ("_") is also permitted. Names must not begin with a digit. Examples of valid (but not very descriptive) C variable names: => foo => Bar => BAZ => foo_bar => _foo42 => _ => QuUx
A) rem = 3.14 % 2.1;
B) rem = modf(3.14, 2.1);
C) rem = fmod(3.14, 2.1);
D) Remainder cannot be obtain in floating point division.
Correct Option - C
Explanationfmod(x,y) - Calculates x modulo y, the remainder of x/y. This function is the same as the modulus operator. But fmod() performs floating point divisions.
A) ceil(1.66)
B) floor(1.66)
C) roundup(1.66)
D) roundto(1.66)
Correct Option - A
Explanation
A) Internal and External
B) External, Internal and None
C) External and None
D) Internal
Correct Option - B
Explanation
External Linkage-> means global, non-static variables and functions.
Internal Linkage-> means static variables and functions with file scope.
None Linkage-> means Local variables.
A) ceil(1.66)
B) floor(1.66)
C) roundup(1.66)
D) roundto(1.66)
Correct Option - A
Explanation
/* Example for ceil() and floor() functions: */
#include
#include
int main()
{
printf("\n Result : %f" , ceil(1.44) );
printf("\n Result : %f" , ceil(1.66) );
printf("\n Result : %f" , floor(1.44) );
printf("\n Result : %f" , floor(1.66) );
return 0;
}
// Output:
// Result : 2.000000
// Result : 2.000000
// Result : 1.000000
// Result : 1.000000
A) Defining
B) Declaring
C) Prototyping
D) Calling
Correct Option - B
Explanation
A function prototype in C or C++ is a declaration of a function that omits the function body but does specify the function's name, argument types and return type.
While a function definition specifies what a function does, a function prototype can be thought of as specifying its interface.
A) rem = 3.14 % 2.1;
B) rem = modf(3.14, 2.1);
C) rem = fmod(3.14, 2.1);
D) Remainder cannot be obtain in floating point division
Correct Option - C
Explanation
fmod(x,y) - Calculates x modulo y, the remainder of x/y.
This function is the same as the modulus operator. But fmod() performs floating point divisions.