Find greatest number out of 10 number without using loop.

Answer Posted / satya

#include<stdio.h>
void main()
{
static int big=0,a=0,cnt=0;
printf("enter number");
scanf("%d",&a);
if(a>big)
big=a;

if(cnt<=10)
{
cnt++
main();
}
printf("largest number amongest 10 numbers is :%d",big);
}

Is This Answer Correct ?    4 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of using #define to declare a constant?

607


Tell us something about keyword 'auto'.

647


How can you increase the size of a statically allocated array?

598


Explain what is the most efficient way to store flag values?

684


What do you mean by command line argument?

627






What is logical error?

590


What is the purpose of void in c?

604


What are different storage class specifiers in c?

602


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

891


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

1865


What does void main return?

590


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2572


What is extern variable in c with example?

526


Can we declare a function inside a function in c?

569


What is pass by reference in c?

594