WorksheetsTechnotsav'23
Total questions: 19
Worksheet time: 12mins
1.The loop which executes at least once even though the condition is false
a.while loop
b.for loop
c.do while loop
d.switch statement
3.
float x = 10.456789;
printf("%.4f",x);
a.14.456789
b.10.4567
c.10.4
d.10.45
4.The C code ‘for(;;)’ represents an infinite loop. It can be terminated by ___________
a.exit(0)
b.return(1)
c.break
d.All the above
5.printf("%d",10/(int)3);
a.3
b.3.333333
c.3.33
d.3.3
6. if(sizeof('a')==sizeof("abc"))
printf("a");
else
printf("b");
a.b
b.error
c.a
d.ab
7.float a = 1.2;
if(a == 1.2)
printf("true");
else
printf("false");
a.true
b.error
c.false
d.none of these
8. if(!printf(""))
printf("Okkk");
else
printf("Hiii");
a.Hiii
b.Okkk
c.Hii
d.Okk
9. int x=1;
if(x-- == 0)
printf("TRUE");
else
printf("FALSE");
a.FLASE
B.TRUE
C.0
d.1
10. if( (-100 & 100)|(20 & -20) )
printf("%s","Condition is true.");
else
printf("%s","Condition is false.");
a.Condition is false
b.error
c.Condition is true
d.none of the above
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.1
2
3
1
b.1
2
3
2
c.1
2
3
3
d.1
2
3
garbage value
12. int a[] = {1,2,3};
int *p;
p = a;
printf("%d\t",*p);
a.1
b.2
c.3
d.error
13. int a[] = {1,2,3};
int *p;
p = a;
(p+1) = p+*p+*p;
printf("%d",*(p+1));
a.1
b.2
c.3
d.4
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.i,ii,iii,iv,v
b.i,v,iii,iv,ii
c.v,iii,iv,ii,i
d.iii,iv,ii,v,i
15.Which statement is valid?
a.ALTER TABLE EMPLOYEE MODIFY (last_name int);
b.ALTER TABLE EMPLOYEE CHANGE (last_name CHAR2(2000));
c.ALTER TABLE EMPLOYEE CHANGE (last_name VARCHAR2 (2000));
d.ALTER TABLE EMPLOYEE MODIFY (last_name VARCHAR2 (2000));
16. Routing is
A. Static
B. Dynamic
C. Static and dynamic
D. None of these
17.Which uses TCP
A. Simple mail transfer protocol
B. Simple network management protocol
C. Simple mail transfer and network management protocol
D. None of the mention
18. Which of the following is not a component of Apache Tomcat
A. Servlet container
B. HTTP container
C. DNS server
D. JSP engine
19.Machine that places the request to access the data, generally called ____
A. Server machine
B. Client machine
C. Request machine
D. Intelligent machine
