GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 6 of 87    Print  
Write one statement equivalent to the following two statements
x=sqr(a);
return(x);
Choose from one of the alternatives
a.return(sqr(a));
b.printf("sqr(a)");
c.return(a*a*a);
d.printf("%d",sqr(a));
D



  
Total Answers and Comments: 10 Last Update: June 19, 2009   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Amrutha
 
x=sqr(a);return(x);Ans:-option Areturn(sqr(a));

Above answer was rated as good by the following members:
hrs1129
March 17, 2005 07:25:02   #1  
natasha vellanki        

RE: Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of ...
Answer is A
 
Is this answer useful? Yes | No
August 23, 2005 03:09:31   #2  
Sinic        

RE: Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of ...
last statement is return how printf is possible which is a console output statement

Ans : A

 
Is this answer useful? Yes | No
August 24, 2005 03:07:05   #3  
Meghraj Shah        

RE: Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of ...
D is the right answer though A is possible too.But when u have to select only one option ..choose the closest answer which is D.
 
Is this answer useful? Yes | No
August 25, 2005 02:06:23   #4  
rp        

RE: Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of ...
answer is A how could it be D.
there is no need of printing at all.
Y U behave foolish.
plzzz don't misguide the new visitors
its problem for our site..

 
Is this answer useful? Yes | No
February 03, 2006 22:46:06   #5  
MAHAVEER PATIL        

RE: Write one statement equivalent to the following tw...
printf( sqr(a) )
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
July 04, 2006 11:42:56   #6  
divya        

RE: Write one statement equivalent to the following tw...
what is the need to print sqr(a)???.. its just been asked for an equivalent statement. I think it should be option A.
 
Is this answer useful? Yes | No
October 24, 2006 13:47:58   #7  
Amrutha        

Write one statement equivalent to the following two statements
x sqr(a);return(x);Ans:-option Areturn(sqr(a));
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 02, 2008 03:37:40   #8  
SpandanaMohan Member Since: January 2008   Contribution: 12    

RE: 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));
answer is option A
 
Is this answer useful? Yes | No
June 18, 2008 00:41:28   #9  
sravana sandhya Member Since: June 2008   Contribution: 2    

RE: 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));
option :a. i think 'd' is also correct. but it is not equivalent to above question.there is no need to go option d.
 
Is this answer useful? Yes | No
June 19, 2009 10:29:00   #10  
nagarjunat Member Since: October 2008   Contribution: 3    

RE: 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));
Yes the ans is: A
Please see the question in that they give the two statements by using the two statements we can write one single statement so there is no need for going choice D.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
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