0% found this document useful (0 votes)
128 views19 pages

Zensar Tech

The document contains 25 technical questions related to programming concepts such as SQL, C, C++, data structures, and algorithms. The questions cover topics like SQL commands, valid variable names, string functions, conditional statements, data types, pointers, file handling, operator precedence, macros, classes, and storage classes.

Uploaded by

Rashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views19 pages

Zensar Tech

The document contains 25 technical questions related to programming concepts such as SQL, C, C++, data structures, and algorithms. The questions cover topics like SQL commands, valid variable names, string functions, conditional statements, data types, pointers, file handling, operator precedence, macros, classes, and storage classes.

Uploaded by

Rashi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Zensar Technical Questions

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?

https://www.freshersnow.com/
(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?

https://www.freshersnow.com/
(A) INSTR

(B) SUBSTRING

(C) SUBSTR

(D) POS

4. For what values if i the output will be 5?

main()

https://www.freshersnow.com/
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 .?

https://www.freshersnow.com/
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));

https://www.freshersnow.com/
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);

https://www.freshersnow.com/
11. What is the output of the program?

main(){

extern int i;

i=5;

printf(?%d?,i);

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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")

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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?

https://www.freshersnow.com/
#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)

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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

https://www.freshersnow.com/
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

https://www.freshersnow.com/
.

110101

24. State the object oriented language?

a ) C++

b) Java

c) Eiffel

d) All of the above

Ans: D

https://www.freshersnow.com/
25.Which of the following is/are storage class

a) Automatic

b) Static

c) Allocated

D) All of above

Ans: D

https://www.freshersnow.com/

You might also like