GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 56 of 87    Print  
cond 1?cond 2?cond 3? exp 1:exp 2:exp 3:exp 4; is equivalent to which of the following?

A. if cond 1
     exp 1;
     else if cond 2
     exp 2;
     else if cond 3
     exp 3;
     else exp 4;
B. if cond 1
     if cond 2
     if cond 3
     exp 1;
     else exp 2;
     else exp 3;
     else exp 4;
C. if cond 1 && cond 2 && cond 3
     exp 1 |exp 2|exp 3|exp 4;
D. if cond 3
      exp 1;
      else if cond 2 exp 2;
      else if cond 3 exp 3;
      else exp 4;


  
Total Answers and Comments: 1 Last Update: May 19, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 19, 2006 06:18:24   #1  
Geeta Sajjan        

RE: cond 1?cond 2?cond 3? exp 1:exp 2:exp 3:exp 4; is ...

Ans is B

if (cond 1)

{ if ( cond 2)

{ if (cond 3)

{ exp 1

}

else

{ exp2

}

}

else

{ exp 3

}

}

else

{ exp 4

}


 
Is this answer useful? Yes | No

 Related Questions

Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of the alternativesa.return(sqr(a));b.printf("sqr(a)");c.return(a*a*a);d.printf("%d",sqr(a));

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;

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

Write one statement equivalent to the following two statements:   x=sqrA.;  return(x);Choose from one of the alternativesA. return(sqrA)B. printf("sqrA.")C. return(a*a*a)D. printf("%d",sqrA.)

Read the function conv() given belowconv(int t){int u;u=5/9 * (t-32);return(u);                            }What is returnedA. 15B.  0C. 16.1D. 29

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 0     ...     while(TRUE){ ....}

Latest Answer : '9' is a charecter constant ...

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

Cond 1?cond 2?cond 3? exp 1:exp 2:exp 3:exp 4; is equivalent to which of the following?A. if cond 1     exp 1;     else if cond 2     exp 2;     else if cond 3     exp 3;     else exp 4;B. if cond 1     if cond 2     if cond 3     exp 1;     else exp 2;     else exp 3;    

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 yearD. computes compound interest for 1 year


 Sponsored Links

 
Related Articles

Verizon Interview Procedure and Placement Paper

Please find the Verizon Interview Procedure and Placement Paper from May 2005.http://www.geekinterview.com/question_details/13365
 

Polaris Interview Preparation and Model Question papers

Polaris Interview Preparation and Model Question papers :  Please find Aptitude(41), Analytical(28), Interview Procedure(1)Click here to view the section
 

Nucleus Interview Preparation and Model Question papers

Nucleus Interview Preparation and Model Question papers. The following model question papers are added. Up One Level   Global-Interview-Questions » Nucleus »
 

Oracle Interview Preparation and Model Question papers

Oracle Interview Preparation and Model Question papers updated with more SQL Questions, Technical, RDBMS Basics and C. Oracle  
 

Mascot Interview Procedure, Pattern and Model Question Papers

Mascot Interview Procedure, Pattern and Model Question Papers Interview ProcedureAt the moment we do not have much informaton about the interview though the candidate may be required to go through both technical and HR interviews. There are a total 6 sections in the written test. Each section h
 

Ramco Interview Procedure, Pattern and Model Question Papers

Ramco Interview Procedure, Pattern and Model Question Papers section added.Interview ProcedureThe information on the interview is pretty sketchy but it consists of both technical grilling and HR interview.The written test consists of both aptitude and a technical test.The aptitude section of the tes
 

Keane India Placement Paper

Hi all , I recently went for Keane India Testing Paper. They offer 2 courses. 1. Advanced Application Programming 5 months course roughly 2. Testing Course 45 days roughly Selected students are given trainig and then the one efficient in their work are absorbed by Keane as Trainee on Stipend b
 

A couple of papers by Mladen Gogala

I was looking for something on google groups last night and came across a post by Mladen that included a link to his website. As I did not remember him having a site I went for a look. Mladen's site....[Read More] Posted by Pete On 03/10/05 At 10:36 PM
 

Will Paying for Resume Placement on Job Boards Help Your Search?

More job hunters are ponying up in hopes of a better chance of getting noticed by employers. But is it worth the money?
 

Justin talks about a new series of papers on Oracle security by Arup

I saw Justin's post today to his blog titled " Default Passwords are Evil " and could not agree more. The latest Oracle worm takes advantage of the fact that Oracle has so many default users with known default passwords....[Read More] Posted by Pete On 09/01/06 At 09:55 PM
 

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