Zensar Placement paper-Technical C
1. Which command will delete all data from a table and will not write to the rollback segment?
(A) DROP
(B) DELETE
(C) CASCADE
(D) TRUNCATE
2. Which of the following can be a valid column name?
(A) Column
(B) 1966_Invoices
(C) Catch_#22
(D) #Invoices
3. Which character function can be used to return a specified portion of a character string?
(A) INSTR
(B) SUBSTRING
(C) SUBSTR
(D) POS
4. For what values if i the output will be 5?
main()
{
int i,j=2;
if(i%j !=0)
j=5;
printf(?%d?,j);
}
a)when i is even
b)odd
c)prime
d) for all
5. complexity of merge sort .?
6. which sorting also will use to sort {1,2,3,4,5}?
7. which cpu register holds the address of next instruction?
8. Write the output ?
Main()
{
Char *p[]=?pradeep mani?;
Printf(?%c%c%c%c?,p[i],i[p],(*p+1),*(p+1));
}
9. Find the output?
char *p[]=?rachit and devender?;
printf(?%C?,++(p[4]));
10.Find the output?
const char *p[]=?abhishek and Ankur?;
char k=?a?;
p[1]=k;
printf(?%s?,p);
11. What is the output of the program?
main(){
extern int i;
i=5;
printf(?%d?,i);
}
12. What is the output of the program
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1*4/3-27%3^2+100*0.5-(4>3?1:2);
clrscr();
printf("%d",i);
getch();
}
A. 49
B. compile error
C. 51
D. 48
Ans: B
13.What is the output of the program?
main()
{
int x=5, y;
y= x*x++ * ++x ;
// print x and y
}
14.what will be output of the above programme?
.int a=1.1
float b=1.1
if (a==b)
{
printf("both are same")
}
else
{
printf("both are differnt")
}
15.what is the priority level of (),++,/,(),/,++ 2.++.(),/
ans-1
16. what is meant by int (* xyz)[13]
17. what is true from
a. base call reference is compatible with child class
b. child class reference is compatible with base class
c. no reference to class
d. ??
18. class b class a
{ friend class b }
then what is true
a. a can access all protected and public members in b
b. b can access all protected and public members in a
c. a can access all members of a
d. b can access all members of b
19 : what is the output?
#include
main()
{ int n=0; int i; i=2; switch(1)
{ case 0:do{ case 1:n++; case 2:n++; }while(--i>0); }printf(\"n=%d\",n); }
a. compile error
b. 4
c. 1
d. 0
20. #define sqr(x) x*x, what is value of j if j = 2 * sqr(3 + 4)
21. #define FILENAME(extension) test_##extension, how will it print FILENAME(back)
a. test_back
b. test_#back
c. test_##back
d. ??
22. char *p = \"hello world\"
p[0] = \'H\', what will be printf(\"%s\", p);
a. Hello world
b. hello world
c. H
d. compile error
23. int fun(),how do u define pointer to this function ??
19. select * from dual ; output..?
20. which is the fastest ?
A) FTP
B)TELNET
C)TCP
21. Find the output ?
main(){
int x=20 ,y=35;
x= x++ + y++;
y = ++x + ++y;
printf(?%d %d?,x,y);
}
22. if(fp = fopen(\"dfas\",\"r\") == NULL),what is the value of fp
a. NULL
b. 0
c. 1
d. 0 or 1
23. calculating the no of bits required for the error detection & the error correction for the given
codeword set.
codeword a:
A)0000
B)0001
D)0011
C)1111
codeword b:
101111
.
.
.
.
110101
24. State the object oriented language?
a ) C++
b) Java
c) Eiffel
d) All of the above
Ans: D
25.Which of the following is/are storage class
a) Automatic
b) Static
c) Allocated
D) All of above
Ans: D