Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Technotsav'23

Total questions: 19

Worksheet time: 12mins

Name
Class
Date
1.

1.The loop which executes at least once even though the condition is false

a)

a.while loop

b)

b.for loop

c)

c.do while loop

d)

d.switch statement

2.

2. int x = 10;

if(x % 2 == 0)

printf("0");

printf("1");

printf("2");

printf("3");

a)

a.0

b)

b.0123

c)

c.0

1

2

3

d)

d.123

3.

3.

float x = 10.456789;

printf("%.4f",x);

a)

a.14.456789

b)

b.10.4567

c)

c.10.4

d)

d.10.45

4.

4.The C code ‘for(;;)’ represents an infinite loop. It can be terminated by ___________

a)

a.exit(0)

b)

b.return(1)

c)

c.break

d)

d.All the above

5.

5.printf("%d",10/(int)3);

a)

a.3

b)

b.3.333333

c)

c.3.33

d)

d.3.3

6.

6. if(sizeof('a')==sizeof("abc"))

printf("a");

else

printf("b");

a)

a.b

b)

b.error

c)

c.a

d)

d.ab

7.

7.float a = 1.2;

if(a == 1.2)

printf("true");

else

printf("false");

a)

a.true

b)

b.error

c)

c.false

d)

d.none of these

8.

8. if(!printf(""))

printf("Okkk");

else

printf("Hiii");

a)

a.Hiii

b)

b.Okkk

c)

c.Hii

d)

d.Okk

9.

9. int x=1;

if(x-- == 0)

printf("TRUE");

else

printf("FALSE");

a)

a.FLASE

b)

B.TRUE

c)

C.0

d)

d.1

10.

10. if( (-100 & 100)|(20 & -20) )

printf("%s","Condition is true.");

else

printf("%s","Condition is false.");

a)

a.Condition is false

b)

b.error

c)

c.Condition is true

d)

d.none of the above

11.

11. int a[] = {1,2,3};

int i;

for(i=0;i<3;i++)

printf("%d\n",a[i]);

printf("%d\n",a[i]);

a)

a.1

2

3

1

b)

b.1

2

3

2

c)

c.1

2

3

3

d)

d.1

2

3

garbage value

12.

12. int a[] = {1,2,3};

int *p;

p = a;

printf("%d\t",*p);

a)

a.1

b)

b.2

c)

c.3

d)

d.error

13.

13. int a[] = {1,2,3};

int *p;

p = a;

(p+1) = p+*p+*p;

printf("%d",*(p+1));

a)

a.1

b)

b.2

c)

c.3

d)

d.4

14.

14.What is the correct sequence to create a database connection?

i. Import packages or modules.

ii. close the connection

iii. Execute the query .

iv. Process the resultset.

v. Open a connection to the database.

a)

a.i,ii,iii,iv,v

b)

b.i,v,iii,iv,ii

c)

c.v,iii,iv,ii,i

d)

d.iii,iv,ii,v,i

15.

15.Which statement is valid?

a)

a.ALTER  TABLE   EMPLOYEE   MODIFY (last_name int);

b)

b.ALTER  TABLE    EMPLOYEE   CHANGE (last_name CHAR2(2000));

c)

c.ALTER  TABLE   EMPLOYEE    CHANGE (last_name VARCHAR2 (2000));

d)

d.ALTER  TABLE EMPLOYEE  MODIFY (last_name VARCHAR2 (2000));

16.

16. Routing is

a)

A. Static

b)

B. Dynamic

c)

C. Static and dynamic

d)

D. None of these

17.

17.Which uses TCP

a)

A. Simple mail transfer protocol

b)

B. Simple network management protocol

c)

C. Simple mail transfer and network management protocol

d)

D. None of the mention

18.

18. Which of the following is not a component of Apache Tomcat

a)

A. Servlet container

b)

B. HTTP container

c)

C. DNS server

d)

D. JSP engine

19.

19.Machine that places the request to access the data, generally called ____

a)

A. Server machine

b)

B. Client machine

c)

C. Request machine

d)

D. Intelligent machine