Data Types
- Modulus for float could be achieved by?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
fmod(p, q);
- Which data type is suitable for storing a number like?
25.00002500025
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
double
- Which of the following % operation is invalid?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Both 2 % 4f; and 2 % 4l;
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
float fl = 15.621212121212;
printf("%f", fl);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
15.621212
- What is the range of a signed char variable in C?
-
View Hint View Answer Discuss in Forum
char is a single byte variable. Signed char would include negative numbers as well
Correct Option: B
range of signed char variable is -128 to 127 because it is 1 byte long.
2 to the power 8 is 256, range included 256 numbers, as it is signed, include negative integers starting from -128 to 127.