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));

D
This question is related to TCS Interview

Showing Answers 1 - 12 of 12 Answers

Sinic

  • Aug 23rd, 2005
 

last statement is return how printf is possible which is a console output statement 
 
Ans : A

  Was this answer useful?  Yes

Meghraj Shah

  • Aug 24th, 2005
 

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.

  Was this answer useful?  Yes

rp

  • Aug 25th, 2005
 

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..

  Was this answer useful?  Yes

MAHAVEER PATIL

  • Feb 3rd, 2006
 

printf("sqr(a)")

  Was this answer useful?  Yes

divya

  • Jul 4th, 2006
 

what is the need to print sqr(a)???.. its just been asked for an equivalent statement. I think it should be option A. 

  Was this answer useful?  Yes

Amrutha

  • Oct 24th, 2006
 

x=sqr(a);return(x);Ans:-option Areturn(sqr(a));

nagarjunat

  • Jun 19th, 2009
 

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions