No student devices needed. Know more
10 questions
What is the 16-bit compiler allowable range for integer constants?
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
What will happen when the following code is executed?
void main()
{
printf("MIET");
main();
}
Wrong statement
It will keep on printing MIET
It will print MIET once
None of these
What is the result after execution of the following code if a is 10, b is 5, and c is 10?
if ((a > b) && (a <= c))
a = a + 1;
else
c = c+1;
a = 10, c = 10
a = 11, c = 10
a = 10, c = 11
a = 11, c = 11
Which one of the following is a loop construct that will always be executed once?
for
while
switch
do while
Directives are translated by the
Pre-processor
Compiler
Linker
Editor
Which of the following will copy the null-terminated string that is in array src into array dest?
dest = src;
dest == src;
strcpy(dest, src);
strcpy(src, dest);
What will the result of 'num' variable after execution of the following statements?
int num = 58;
num % = 11;
3
5
8
11
What will the result of num1 variable after execution of the following statements?
int j = 1, num1 = 4;
while (++j <= 10)
{
num1++;
}
11
12
13
14
What will be the output of the following code?
#include <stdio.h>
int main()
{
int *ptr, a = 10;
ptr = &a;
*ptr += 1;
printf("%d,%d/n", *ptr, a);
}
10, 10
10, 11
11, 10
11, 11
Give the following declarations and an assignment statement. Which one is equivalent to the expression str [4]?
char str[80];
char * p;
p = str;
p + 4
*p + 4
*(p + 4)
p[3]
Explore all questions with a free account