CDAC Paper - Part 2 21. The statement that prints out the character set from A-Z, is for( a = `z`; a < `a`; a = a - 1) printf(%c, &a); for( a = `a`; a <= `z`; a = a + 1 printf(%c, &a); for( a = `A`; a <= `Z`; a = a + 1)<----Ans printf(%c, a); for( a = `Z`; a <= `A`; a = a + 1) printf(%c, a); 22. The statement which prints out the values 1 to 10 on separate lines, is for( count = 1; count <= 10; count = count + 1) printf(%d\n,count); for( count = 1; count < 10; count = count + 1) printf(%d\n,count);<------ans for( count = 0; count <= 9; count = count + 1) printf(%d ,count); for( count = 1; count <> 10; count = count + 1) printf(%d\n,count); 23. What does the term `call-by-reference` refer to? Passing a copy of a variable into a function. Passing a pointer to a variable into a function. <------ans Choosing a random value for a variable. A function that does not return any values. 24. What is the output of the following code? #include void swap(int&, int&); void main() { int a = 10,b=20; swap (a++,b++); printf(\n%d\t%d\t,a, b); } void swap(int& x, int& y) { x+=2; y+=3; } 14, 24 11, 21 <------ans 10, 20 Error 25. What is the output of the following program code #include void abc(int a[]) { a++; a[1]=612; } main() { char a[5]; abc(a); printf(%d,a[4]); } 100 612 Error<------ans None of these options 26. which of the following is true about recursive function i. it is also called circular definition ii. it occurs when a function calls another function more than once iii. it occurs when a statement within the function calls the function itself iv. a recursive function cannot have a return statement within it i and iii<------ans i and ii ii and iv i, iii and iv 27.What will happen if you assign a value to an element of an array whose subscript exceeds the size of the array? The element will be set to 0 Nothing, its done all the time Other data may be overwritten Error message from the compiler 28. What is the output of the following code? #include void main() { int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }}; printf(\n%d,**(*arr+1)+2+7); } 16 <------ans 7 11 Error 29. If int s[5] is a one dimensional array of integers, which of the following refers to the third element in the array? *( s + 2 ) <------ans *( s + 3 ) s+3 s+2 30. #includestdio.h main() { int *p1,i=25; void *p2; p1=&i; p2=&i; p1=p2; p2=p1; printf(%d,i); } The output of the above code is : Program will not compile <------ans 25 Garbage value Address of I 31. What is the output of the following code? void main() { int i = 100, j = 200; const int *p=&i; p = &j; printf(%d,*p); } 100 200 <------ans 300 None of the above 32. void main() { int i=3; int *j=&i; clrscr(); printf(%d%d,++*j,*(&i)); } What is the output of this program? 33 4 3 <------ans 4,address of i printed Error:Lvalue required 33. What is the output of the following code? #include void main() { int arr[] = {10,20,30,40,50}; int *ptr = arr; printf(\n %d\t%d\t,*ptr++,*ptr); } 10 20 10 10<------ans 20 20 20 10 34. Which of these are reasons for using pointers? 1.To manipulate parts of an array 2.To refer to keywords such as for and if 3.To return more than one value from a function 4.To refer to particular programs more conveniently 1 & 3 <------ans Only 1 Only 3 All of the above 35. struct num { int no; char name[25]; }; void main() { struct num n1[]={{25,rose},{20,gulmohar}, {8,geranium},{11,dahalia}}; printf(%d%d ,n1[2].no,(*&n1+2)->no+1); } What is the output of this program? 88 8 9 <------ans 98 8 , unpredictable 36. During initializing a union Only one member can be initialised. All the members will be initialised. Initialisation of a union is not possible.<------ans None of these options 37. Self referential structure is one a. Consisting the structure in the parent structure b. Consisting the pointer of the structure in the parent structure Only a Only b Both a and b Neither a nor b 38. Individual structure member can be initialized in the structure itself True False Compiler dependent None of these options 39. Which of the following is the feature of stack? All operations are at one end It cannot reuse its memory All elements are of different data types Any element can be accessed from it directly<------ans 40. When stacks are created Are initially empty<------ans Are initialized to zero Are considered full None of these options

CDAC Placement Paper 3.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

67KB Sizes 0 Downloads 112 Views

Recommend Documents

CDAC Placement Paper 1.pdf
The programming language that was designed for specifying algorithm. Address. ASCII. ALGOL. None of these options. 2. _____ contains the addresses of all the records according to the contents of the field designed as the record key. Index<------an

MindTree Placement Paper - ITtestpapers.com
May 5, 2005 - 30 mins for aptitude and 15 mins for coding. I remeber few q's: ... The speed of the truck is 16km/hr slower than car. Find the .... category.html.

MindTree Placement Paper - ITtestpapers.com
May 5, 2005 - 30 mins for aptitude and 15 mins for coding. .... www.ittestpapers.com/articles/mindtree-paper---05-may-2005---bit-campus.html#ixzz0rb7jcuLR.

ADP Placement Paper 5.pdf
Page 1 of 1. Hi Friends,. I had attended 4 ADP on june 18th the pattern is as follows firstly the written test takes place in that u will be asking aptitude,. some c q's ...

Satyam Placement Paper 33.pdf
3.intel's first micropro...a.pentium b.pentiumproetc ... 9.diff between 8087,8086 (which is latest vers.) 10.some ... Displaying Satyam Placement Paper 33.pdf.

Mphasis Placement Paper 2.pdf
Page 1 of 1. 2009 Mphasis Placement Papers Interview Experience. MPHASIS PAPER ON 7th SEPTEMBER 2009. Hi, I'm K.K.Aravindhan doing my final year ...

Motorola Placement Paper 3.pdf
format and 10 questions were multiple choice questions. 1. ... then printf(%s,5[p]); ... code for finding out whether a string is a palindrome,reversal of linked list, ...

Sample Placement Paper of Aakash Institute.pdf
Sample Paper. Aakash ..... In a certain code, "Beautiful I peacock saw" is given .... (1) Mango. (2) Banana. (3) Apple. (4) Carrot. 87. Complete the series. ? (1). (2).

Flextronics Placement Paper 9.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect ...

Capgemini Placement Paper 3.pdf
Capgemini Placement Paper 3.pdf. Capgemini Placement Paper 3.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Capgemini Placement Paper ...

CTS Placement Paper 2.pdf
I told OS and COMPUTER NETWORKS. So asked me to explain types of scheduling.asked me few more from OS.†did not know the†answer. HR: tell me about ...

cts-placement paper 2010.pdf
Page 2 of 3. he hears of 'four-dimensional' things, he is seized by a feeling, which is very similar to the. thoughts awakened by the occult. And at the same time the statement that the world in which we. live is a four-dimensional space - time conti

Deloitte Placement Paper 3.pdf
They expect students to be strong in the Enterprise application and Technology integration field. QUESTION PATTERN AND A FEW QUESTIONS. The pattern was similar to CTS pattern as the HR's were former CTS employees. The booklet given here was PINK. 40

TCS Placement Paper 3.pdf
28) p and q are pointers to the same type of dataitems. Which of these are ... followed by funk characters. c) name = \ ... Page 1 of 1. TCS Placement Paper 3.pdf.

Satyam Placement Paper 3.pdf
the h.r and finally got the job.and i am the one of them.i would like to share my ... 12)a problem from data interpretation..it was on line graphs...very big..not easy ...

Mindtree Placement Paper 6.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

Flextronics Placement Paper 2.pdf
Ans. Divide and Conquer. 23. Program counter is incremented in. a. fetch (ans). b. decode. c. execute. 24. what does the following program do ? f(int n). {. int c;.

Satyam Placement Paper 27.pdf
... and Interviews of Satyam held on 13th and 14th of September in Bangalore. ... Now,they asked whats the best way for A to send mails to B.. ... *How does JAVA implement multiple inheritance?[extends classes & implements interfaces]. HR.

Honeywell Placement Paper 3.pdf
Most of the question were from SOFTWARE ENGINEERING, C programming, Data structures, Operating systems such as- -> SDLC (software development life cycle)-what r various models [waterfall, prototype, iterative enhancement, spiral], wht r. the steps un

Cisco Placement Paper 1.pdf
Page 1 of 1. Placement Paper of CISCO. CISCO. ††††† (October, 2004). 1. In order to find out stack fault of a three input nand gate how many necessary input vectors. are needed ? 2. What is parity generation ? 3. A nand gate becomes ___ gat

Wipro Placement Paper 11.pdf
2)a person is running at a speed of 18km/hr After one† min a bomb blasts .Sound travels at ... If(0==fork()). ††† I+=10; ... Displaying Wipro Placement Paper 11.pdf.

ICICI Placement Paper 6.pdf
If the cost of the car is Rs.60 and a profit of 10% over selling price is earned (Ans: Rs 66/-)16. 1/3 of girls , 1/2 of boys go. to canteen .What factor and total number of classmates go to canteen. Ans: Cannot be determined. 17. The price of a prod

Deloitte Placement Paper 1.pdf
Page 1. Whoops! There was a problem loading more pages. Deloitte Placement Paper 1.pdf. Deloitte Placement Paper 1.pdf. Open. Extract. Open with. Sign In.

eFunds Placement Paper 1.pdf
2) Some questions related 2 windows.... Ans) FAT ... a) clustered b) nonclustered c) unique but clustered or no clustered... etc. 5) Which is ... Technical interview (30 - 45 min) questions from C, C++, Area of interest & final sem project. if v stud