wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Debugging Showdown

Total questions: 25

Worksheet time: 8mins

Name
Class
Date
1.

What will happen when the following code is executed?

void main()

{

printf("SRM");

main();

}

a)

Wrong statement

b)

It will keep on printing SRM

c)

It will print SRM once

d)

None of these

2.

What is the 16-bit compiler allowable range for integer constants?

a)

-3.4e38 to 3.4e38

b)

-32767 to 32768

c)

-32668 to 32667

d)

-32768 to 32767

3.

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)

a = 10, c = 10

b)

a = 11, c = 10

c)

a = 10, c = 11

d)

a = 11, c = 11

4.

Which one of the following is a loop construct that will always be executed once?

a)

for

b)

while

c)

switch

d)

do while

5.

Directives are translated by the

a)

Pre-processor

b)

Compiler

c)

Linker

d)

Editor

6.

Which of the following will copy the null-terminated string that is in array src into array dest?

a)

dest = src;

b)

dest == src;

c)

strcpy(dest, src);

d)

strcpy(src, dest);

7.

What will the result of 'num' variable after execution of the following statements?

int num = 58;

num % = 11;

a)

3

b)

5

c)

8

d)

11

8.

What will the result of num1 variable after execution of the following statements?

int j = 1, num1 = 4;

while (++j <= 10)

{

num1++;

}

a)

11

b)

12

c)

13

d)

14

9.

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);

}

a)

10, 10

b)

10, 11

c)

11, 10

d)

11, 11

10.

Give the following declarations and an assignment statement. Which one is equivalent to the expression str [4]?

char str[80];

char * p;

p = str;

a)

p + 4

b)

*p + 4

c)

*(p + 4)

d)

p[3]

11.
Which two encryption protocols might be used to provide secure transmissions for browser and web server communications?
a)
HTTP & HTTPS
b)
SSL & TLS
c)
SSL & HTTP
d)
TCP & UDP
12.

In the client-server model, what is the primary protocol used for communication between a browser & web server?

a)

FTP

b)

TCP

c)

HTTP

d)

SSL

13.
________ is an operating system that is designed specifically to support a network.
a)
Stand-alone OS
b)
Server OS
c)
Mobile OS
d)
Free OS
14.

POST is short for

a)

Power On Self Test

b)

Power Off Self Test

c)

Program On Self test

d)

Program Off Self Test

15.

Collection of information stored in a database at a particular moment is

a)

view

b)

schema

c)

instance

d)

none of the above

16.

Data items grouped together for storage purposes are called a :

a)

Record

b)

title

c)

list

d)

string

17.

What technology enables thinking capability in computers?

a)

Deep Learning

b)

Artificial Intelligence

c)

AGI

d)

None of the above

18.

Which of the following is an example of Turing Test?

a)

Conversation between man and machine

b)

Bot chat

c)

CAPTCHA

d)

all of the above

19.

Name the movie behind this meme template

a)

Andaaz

b)

Suhaag

c)

Dhadkan

d)

Aitraaz

20.

Choose the attributes of Class: time

a)

Hours

b)

second

c)

get Hour

d)

Print Time

21.

What will be the output of the following code?

int x = 5;

printf("%d", x++);

a)

Compilation error

b)

None of the above

c)

6

d)

5

22.

Which of the following is a characteristic of a relational database?

a)

Data is stored in objects

b)

Data is stored in files

c)

Data is stored in arrays

d)

Data is stored in tables

23.

What will be the result of the following expression: 10 / 3?

a)

3

b)

4

c)

3.0

d)

3.33

24.

What will be the output of the following code?

int a = 3, b = 4;

printf("%d", a + b);

a)

12

b)

7

c)

None of the above

d)

Error

25.

Which of the following is a valid way to declare a pointer in C?

a)

ptr int;

b)

int ptr;

c)

int *ptr;

d)

pointer int;