how to find greatet of 10 numbers without using array?

Answers were Sorted based on User's Feedback



how to find greatet of 10 numbers without using array?..

Answer / c.p.senthil

int main()
{
int i, num;
int greatest=0;

for(i=0; i<10; i++)
{
scanf("%d", &num);
if(num > greatest)
greatest = num;
}
printf("greatest = %d", greatest);
return 0;
}

Is This Answer Correct ?    9 Yes 2 No

how to find greatet of 10 numbers without using array?..

Answer / afreen chitragar

int main()
{
int i, num;
int greatest=0;

for(i=0; i<10; i++)
{
scanf("%d", &num);
if(num > greatest)
greatest = num;
}
printf("greatest = %d", greatest);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No

how to find greatet of 10 numbers without using array?..

Answer / guest

using ? And & operator wa can find out the soution

Is This Answer Correct ?    0 Yes 0 No

how to find greatet of 10 numbers without using array?..

Answer / aman

int main()
{
int i, num;
int greatest=0;

for(i=0; i<10; i++)
{
scanf("%d", &num);
if(num > greatest)
greatest = num;
}
printf("greatest = %d", greatest);
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How can a process change an environment variable in its caller?

0 Answers  


What is static identifier?

0 Answers   TCS,


What is wrong in this statement?

0 Answers  


wt is diference between int and int pointer as same as float and float pointer and char and char pointer

8 Answers   CTS, Infosys,


Does c have enums?

0 Answers  


what are bit fields in c?

2 Answers  


What are the two forms of #include directive?

0 Answers   Aspire, Infogain,


What are the loops in c?

0 Answers  


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

1 Answers  


How can I convert a number to a string?

0 Answers  


What are local and global variables?

3 Answers  


Categories