Find greatest number out of 10 number without using loop.
Answer Posted / dheeraj
#include<stdio.h>
#include<conio.h>
input(int a[]);
find(int []);
int i=0,a[10],j=0,max=0;
main()
{
clrscr();
printf("enter no");
input(a);
find(a);
printf("\nmax no is==%d",max);
}
input(int a[10])
{
i++;
scanf("%d",&a[i]);
if(i<10)
{
input(a);
}
}
find(int a[10])
{
if(j<10)
{
j++;
if(max<a[j])
{
max=a[j];
}
find(a);
}
}
Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
How do you construct an increment statement or decrement statement in C?
what are non standard function in c
What is main () in c language?
What is null character in c?
Explain b+ tree?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
What is the best style for code layout in c?
What is variable and explain rules to declare variable in c?
Can main () be called recursively?
What is pragma c?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is storage class?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What is NULL pointer?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?