Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Find greatest number out of 10 number without using loop.

Answers were Sorted based on User's Feedback

Find greatest number out of 10 number without using loop...

#include<stdio.h>
int MAX(int a,int b)
{
if(a>b)
return a;
else
return b;
}

int max(int a[],int n)
{
if(n==1)
return a;
else
return MAX(a[n-1],max(a,n-1));
}
int main()
{
int a[]={3,5,1,5,7,3,9,0,2,6};
int n=10,big;
big=max(a,n);
printf("%d",big);
return 0;
}

 Is This Answer Correct ? 8 Yes 2 No

Find greatest number out of 10 number without using loop...

#include<stdio.h>
#include<conio.h>
input(int a[]);
find(int []);
int i=0,a,j=0,max=0;
main()
{
clrscr();

printf("enter no");
input(a);
find(a);
printf("\nmax no is==%d",max);
}
input(int a)
{
i++;
scanf("%d",&a[i]);
if(i<10)
{
input(a);
}
}
find(int a)
{

if(j<10)
{
j++;

if(max<a[j])
{
max=a[j];
}
find(a);
}

}

 Is This Answer Correct ? 9 Yes 8 No

Find greatest number out of 10 number without using loop...

#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

Find greatest number out of 10 number without using loop...

#include<stdio.h>
void main()
{
static int big=0,a=0,cnt=0;
printf("enter number");
scanf("%d",&a);
if(a>big)
big=a;

if(cnt<=10)
{
cnt++
main();
}
printf("largest number amongest 10 numbers is :%d",big);
}

 Is This Answer Correct ? 4 Yes 10 No

Find greatest number out of 10 number without using loop...

/* for same qustion this */

void main()
{
int a,b;
clrscr();
printf (enter the two number :);
scanf("%d%d",a,b);
if (a>b)
printf ("%d\n greater number",a);
else
printf ("%d\n greter number",b);
getch();
}

 Is This Answer Correct ? 11 Yes 48 No

More C Interview Questions

IS Doon college of Engn.. has good faculty

hi any body pls give me company name interview conduct "c" language only

What's the difference between DELETE TABLE and TRUNCATE TABLE commands?

1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

Explain how can you determine the size of an allocated portion of memory?

how to swap four numbers without using fifth variable?

Sir i want e-notes of C languge of BAlaguruswami book i.e scanned or pdf file of balaguruswamy book on c language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com

What is a string?

Explain what are multidimensional arrays?

When can a far pointer be used?

how to find out the inorder successor of a node in a tree??

How many levels deep can include files be nested?

Categories
• C (4646)
• C++ (3460)
• VC++ (653)
• Delphi (566)
• Python Related (3238)
• PHP Related (7341)
• Scala (340)
• R Programming (396)
• Kotlin (184)
• Apache Groovy (39)
• Ruby (245)
• Go Programming Language (139)
• Objective-C (429)
• Programming Languages AllOther (736)