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

Explain the ternary tree?

601


What is function prototype?

610


What is an auto variable in c?

758


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

631


Why is c so powerful?

687






Why do we use header files in c?

582


Explain what is the benefit of using const for declaring constants?

614


What are the different types of C instructions?

678


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2800


Explain the difference between #include "..." And #include <...> In c?

632


Who developed c language?

642


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

588


What is pointer and structure in c?

574


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

636


Tell me with an example the self-referential structure?

566