program to find a smallest number in an array
Answer Posted / sathish
main()
{
int a[20],n,i,s;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
s=a[0];
for(i=0;i<n;i++)
{
if(s>a[i])
{
s=a[i];
}
}
printf("the smallest number is %d",s);
}
| Is This Answer Correct ? | 138 Yes | 57 No |
Post New Answer View All Answers
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What are the two forms of #include directive?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What is huge pointer in c?
What is a stream?
Is c still relevant?
a c code by using memory allocation for add ,multiply of sprase matrixes
Explain how can I convert a string to a number?
How do we make a global variable accessible across files? Explain the extern keyword?
What's the difference between constant char *p and char * constant p?
The difference between printf and fprintf is ?
Explain what is the benefit of using enum to declare a constant?
c program to compute AREA under integral
How can you determine the maximum value that a numeric variable can hold?