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
Why do we need volatile in c?
What are # preprocessor operator in c?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is double pointer in c?
Give differences between - new and malloc() , delete and free() ?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is use of bit field?
Can we declare variables anywhere in c?
What is enumerated data type in c?
What is sizeof c?
What is a macro in c preprocessor?
Why is c platform dependent?
how can I convert a string to a number?
How can I change their mode to binary?
What is indirection? How many levels of pointers can you have?