WorksheetsDebugging Showdown
Total questions: 25
Worksheet time: 8mins
What will happen when the following code is executed?
void main()
{
printf("SRM");
main();
}
Wrong statement
It will keep on printing SRM
It will print SRM once
None of these
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 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]
In the client-server model, what is the primary protocol used for communication between a browser & web server?
FTP
TCP
HTTP
SSL
POST is short for
Power On Self Test
Power Off Self Test
Program On Self test
Program Off Self Test
Collection of information stored in a database at a particular moment is
view
schema
instance
none of the above
Data items grouped together for storage purposes are called a :
Record
title
list
string
What technology enables thinking capability in computers?
Deep Learning
Artificial Intelligence
AGI
None of the above
Which of the following is an example of Turing Test?
Conversation between man and machine
Bot chat
CAPTCHA
all of the above
Name the movie behind this meme template
Andaaz
Suhaag
Dhadkan
Aitraaz
Choose the attributes of Class: time
Hours
second
get Hour
Print Time
What will be the output of the following code?
int x = 5;
printf("%d", x++);
Compilation error
None of the above
6
5
Which of the following is a characteristic of a relational database?
Data is stored in objects
Data is stored in files
Data is stored in arrays
Data is stored in tables
What will be the result of the following expression: 10 / 3?
3
4
3.0
3.33
What will be the output of the following code?
int a = 3, b = 4;
printf("%d", a + b);
12
7
None of the above
Error
Which of the following is a valid way to declare a pointer in C?
ptr int;
int ptr;
int *ptr;
pointer int;
