Practice Tests
Test has been taken 1839 times
Average score 7
Average time taken 5 min 13 sec
Take Test
No '}' main () is closed..hence none of these will be correct
Posted by komeershettyvinod@gmail.com on 2013-05-31 11:05:15
Number: 1 it's Square : 1
Number: 2 it's Square : 4
Number: 3 it's Square : 9
Number: 4 it's Square : 16
Number: 5 it's Square : 25
Posted by dilipparmar on 2013-05-24 05:43:17
Its in loop. It will print 5 line output, square of 5 numbers. Please check.
Posted by xamagar on 2013-05-23 07:28:51
The Answer provided is wrong as there is no semicolon after for loop, Hence we will be getting answer as 1 it's square 1 to 5 it's square 25
Posted by rajeevbnm on 2012-12-26 06:42:11
if there is semi colon after for loop the answer is write otherwise none of these is correct answer
Posted by Pprraashant on 2012-12-08 10:58:49
out put is:
number: 1 its square:1
number: 2 its square:4
number: 3 its square:9
number: 4 its square:16
number: 5 its square:25
because we are intializing i value again in for loop and loop will execute 5 time 1 to 5 as i<=5.
Posted by udaykrishna21 on 2012-11-15 08:51:41
What will the output of the following program?
#include
#include
void main()
{
int i=5;
clrscr();
for(i=1;i<=5;i )
printf("\Number: %d it's Square : %d",i,i*i);
}
how can the answer be
Number: 5 it's Square: 25 ???
it would be
Number: 5 it's Square: 25
if and only if the loop is written like this
for(i=1;i<=5;i );
i.e. with a semicolon at the end
Please take a look
Posted by acousticsakki on 2012-09-08 11:42:05
sir plz explain the output concept question means give explaination
Posted by vijaychandra on 2012-09-08 11:10:52
Similar Tests
view more
