GeekInterview.com
  I am new, Sign me up!
 

TCS C


TCS C

Questions: 87
Comments: 301
 TCS C Tags
 Showing Questions 71-80 of 87 Questions
<< Previous 4 5 6 7 [8] 9 Next >>
 Sponsored Links

 
 TCS C
Sorting Options :  

Which of the following is not an infinite loop ?a.while(1){....}b.for(;;){...}c.x=0;do{/*x unaltered within the loop*/...}while(x==0);d.# define TRUE 0while(TRUE){....}
D 

Read the folllowing code# define MAX 100# define MIN 100........if(x>MAX)x=1;else if(x
D 

A memory of 20 bytes is allocated to a string declared as char *sthen the following two statements are executed:s="Etrance"l=strlen(s);what is the value of l ?a.20b.8c.9d.21
C 

Given the piece of codeint a[50];int *pa;pa=a;to access the 6th element of the array which of the following is incorrect?a.*(a+5)b.a[5]c.pa[5]d.*(*pa + 5)
A 

Regarding the scope of the varibles;identify the incorrect statement:a.automatic variables are automatically initialised to 0b.static variables are are automatically initialised to 0c.the address of a register variable is not accessiabled.static variables cannot be initialised with any expression
B 

Cond 1?cond 2?cond 3?:exp 1:exp 2:exp 3:exp 4;is equivalent to which of the following?a.if cond 1exp 1;else if cond 2exp 2;else if cond 3exp 3;elseexp 4;b.if cond 1if cond 2if cond 3exp 1;else exp 2;else exp 3;else exp 4;c.if cond 1 && cond 2 && cond 3exp 1 |exp 2|exp 3|exp 4; d.if cond 3exp 1;else if cond 2exp 2;else if cond 3exp 3;elseexp 4;
D 

B 
Latest Answer: I think value of y = 5.Because if you format the code, it will look like thisx = 10;y=5;if (x==10){}else if(x==9){}else{   y=8;}Since value of x is 10 so condition if (x==10) will satisfy. And there is no assignment for y. So value of y ...

What does the following code do?fn(int n,int p,int r){static int a=p;switch(n){case 4:a+=a*r;case 3:a+=a*r;case 2:a+=a*r;case 1:a+=a*r;}}a.computes simple interest for one yearb.computes amount on compound interest for 1 to 4 yearsc.computes simple interest for four year d.computes compound interst for 1 year
B 

What is incorrect among teh followingA recursive functiiona.calls itselfb.is equivalent to a loopc.has a termination condd.does not have a return value at all
B 

Which of the following go out of the loopo if expn 2 becoming falsea.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;..}
C 

View page << Previous 4 5 6 7 [8] 9 Next >>

Ask A Question
Go Top
 Sponsored Links

 
Sponsored Links

 
Ask Question
You must login to Ask Question or Register your free account

Category:

 
Question Title:


Question in Detail:

Add this to my Subscribed Questions (?)
Send me email when new answer is posted (?)

 
Subscribe
Get Latest Updates Via RSS Reader or by Email
 Forum Discussion Subscribe to Forum Discussions Via E-Mail Latest Forum Discussions Subscribers
 Knowledge Base Subscribe to Knowledge Base Series Via E-Mail Knowledge Base Subscribers
 Learning Series Subscribe to GeekInterview Learning Series Via EMail Learning Series Subscribers
 Freelance Jobs Subscribe to GeekInterview Freelance Jobs Via EMail Latest Freelance Jobs Subscribers
 GeekInterview Blog Subscribe to GeekInterview Blog Via EMail GeekInterview Blog Subscribers
 Testing Interview Questions Subscribe to Testing Interview Questions Via EMail Testing Interview Questions Subscribers
 Oracle Interview Questions Subscribe to Oracle Interview Questions Via EMail Oracle Interview Questions Subscribers
 Java Interview Questions Subscribe to Java Interview Questions Via EMail Java Interview Questions Subscribers
 Latest Placement Papers Subscribe to Latest Placement Papers Placement Papers Subscribers
 Free Training Subscribe to Free Training Via EMail Free Training Subscribers
 Learn AJAX Subscribe to AJAXwith.com Via EMail AJAXwith Subscribers
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape