interview questions and answers

Placement Papers | TCS Placement Paper

Tuesday, 22 May 2012
Main Menu
Home
Online Test
Contest
Search
FAQs
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions Placement Papers interview questions TCS

This category contains TCS Placement Paper, latest TCS Placement Paper.



Search by tag : Placement Papers, TCS Placement Paper


TCS RECENT PLACEMENT PAPER

PDF Print E-mail
1. Which of the following go out of the loop if expn 2 becoming false
A. while(expn 1){...if(expn 2)continue;}
B. while(!expn 1){if(expn 2)continue;...}
C. do{..if(expn 1)continue;..}while(expn 2);
D. while(!expn 2){if(expn 1)continue;..} 

2.   Consider the following program main() { unsigned int i=10; while(i>=0)   {    printf("%u",i)    i--;    } } How many times the loop will get executed
A.10
B.9
C.11
D. infinite 

3.   Pick out the odd one out
A. malloc()
B. calloc()
C. free()
D. realloc() 

4.   Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is
A. 1
B. 3
C. -6
D. none 

5.   # define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is A. 8
B. 6
C. 7
D. None 

6.   Consider the following program segment int n, sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default: sum=0; } If n=2, what is the value of sum
A. 0
B. 6
C. 3
D. None of these 

7.   Identify the incorrect one 1.if(c=1) 2.if(c!=3) 3.if(a<b)then 4.if(c==1)
A. 1 only
B. 1&3
C. 3 only
D. All of the above 

8.   The format specified for hexadecimal is A. %d B. %o C. %x D. %u 

9.   Find the output of the following program main() { int x=5, *p; p=&x printf("%d",++*p); } A. 5 B. 6 C. 0 D. none of these 

10.   Consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } } The final value of x is A. 6 B. 8 C. 1 D. 3 

11.   Int *a[5] refers to A. array of pointers B. pointer to an array C. pointer to a pointer D. none of these 

12.   Which of the following statements is incorrect

A. typedef struct new     
 {       int n1;       
char n2; 
 } DATA;

B. typedef struct
      {
       int n3;
       char *n4;
       }ICE;

C.   typedef union
       {
       int n5;
       float n6;
       } UDT;

D.  #typedef union
      {
      int n7;
      float n8;
      } TUDAT;
Related items

 
Next >

Placement Papers | TCS Placement Paper

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony