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
What is a global variable in c?
Why is c called "mother" language?
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
What are data structures in c and how to use them?
What is the size of enum in c?
If you know then define #pragma?
What is difference between constant pointer and constant variable?
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?
Explain what are binary trees?
What is the scope of static variables in c language?
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
What is the purpose of sprintf?
Explain how can type-insensitive macros be created?
Explain about the constants which help in debugging?
Is a house a mass structure?