Find greatest number out of 10 number without using loop.

Answer Posted / khurshid alam

#include<stdio.h>
int show();
int main()
{
printf("The bigger value is:%d",show());
}
int show()
{
static int big=0,a=0,c=0;
printf("enter number");
scanf("%d",&a);
if(a>big)
big=a;
if(c<=10)
{
c++;
show();
}
return big;
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a global variable in c?

600


Why is c called "mother" language?

871


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2527


What are data structures in c and how to use them?

684


What is the size of enum in c?

631






If you know then define #pragma?

686


What is difference between constant pointer and constant variable?

640


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

790


Explain what are binary trees?

618


What is the scope of static variables in c language?

638


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

687


What is the purpose of sprintf?

629


Explain how can type-insensitive macros be created?

581


Explain about the constants which help in debugging?

861


Is a house a mass structure?

654