how to find greatet of 10 numbers without using array?
Answer Posted / 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 |
Post New Answer View All Answers
How to write a multi-statement macro?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What do you mean by Recursion Function?
Explain how does flowchart help in writing a program?
What is the difference between the = symbol and == symbol?
Explain zero based addressing.
What are derived data types in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is the purpose of sprintf() function?
How can you invoke another program from within a C program?
What is an auto variable in c?
Here is a neat trick for checking whether two strings are equal
What is line in c preprocessor?
What is pointer and structure in c?
What are control structures? What are the different types?