Data Types
- When double is converted to float, then the value is?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Depends on the compiler
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
unsigned int n = 25;
signed char ch = -25;
if (n > ch)
{
printf("Yes\n");
}
else if (n < ch)
{
printf("No\n");
}
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
No
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n = 25;
char ch = -25;
if (n < ch)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
No
- function tolower(c) defined in library <ctype.h> works for ___________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Any character set
- What will be the output of the following C code considering the size of short int is 2, char is 1 and int is 4 bytes?
#include <stdio.h>
int main()
{
short int k = 23;
char ch = 99;
printf("%d, %d, %d\n", sizeof(k), sizeof(ch), sizeof(ch + k));
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
2, 1, 4