Zensar Technologies C Language Questions Latest

Posted on :01-03-2016
Q1. 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

Q2. Which of the following can be a valid column name?

(A) Column
(B) 1966_Invoices
(C) Catch_#22
(D) #Invoices


Q3. Which character function can be used to return a specified portion of a character string?

(A) INSTR
(B) SUBSTRING
(C) SUBSTR
(D) POS

Q4. 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

Q5. Complexity of merge sort .?

Q6. Which sorting also will use to sort {1,2,3,4,5} ?

Q7. Which cpu register holds the address of next instruction?

Q8. Write the output ?

Main()
{
Char *p[]=?pradeep mani?;
Printf(?%c%c%c%c?,p[i],i[p],(*p+1),*(p+1));
}

Q9. Find the output?

char *p[]=?rachit and devender?;
printf(?%C?,++(p[4]));

Q10.Find the output?
const char *p[]=?abhishek and Ankur?;
char k=?a?;
p[1]=k;
printf(?%s?,p);


Q11. What is the output of the program?

main(){
extern int i;
i=5;
printf(?%d?,i);
}


Q12. What is the output of the program

#include
#include
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


Q13.What is the output of the program?

main()
{
int x=5, y;
y= x*x++ * ++x ;
// print x and y
}


Q14. 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")
}


Q15. What is the priority level of (),++,/,(),/,++ 2.++.(),/ 

ANS: 1


Q16. What is meant by int (* xyz)[13]


Q17. 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. ??


Q18. What is true?

class b class a
{ friend class b }

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

Q19.  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

Q20. #define sqr(x) x*x, what is value of j if j = 2 * sqr(3 + 4)

Q21. #define FILENAME(extension) test_##extension, how will it print FILENAME(back)

a. test_back
b. test_#back
c. test_##back
d. ??

Q22. what will be printf("%s", p);

char *p = "hello world"
p[0] = H, 

a. Hello world
b. hello world
c. H
d. compile error

Q23. int fun(), how do u define pointer to this function ??

Q24. Select * from dual ; output..?

Q25. Which is the fastest ?

A) FTP 
B)TELNET 
C)TCP

Q26. Find the output ?

main(){
int x=20 ,y=35;
x= x++ + y++;
y = ++x + ++y;
printf(?%d %d?,x,y);
}

Q27. What is the value of fp?

if(fp = fopen("dfas","r") == NULL), 

a. NULL
b. 0
c. 1
d. 0 or 1

Q28. 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

Q29. State the object oriented language?

a ) C++
b) Java
c) Eiffel
d) All of the above

ANS: D

Q30.Which of the following is/are storage class

a) Automatic
b) Static
c) Allocated
D) All of above

ANS: D




Placement Papers for All Companies




FreshersLive - No.1 Job site in India. Here you can find latest 2023 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail...
DMCA.com Protection Status