Write a program that accepts an array of numbers and a
number, and return a string “Yes” if
the number is found in the array, “No” if the number is not
found in the array.
Answer Posted / surabhi
void main()
{
int num,i=0,f=0;
int n[]={20,30,40,50};
printf("\n enter no:");
scanf("%d",&num);
for(;i<4;)
{
if(num==n[i++])
{
printf("\n YES");
f=1;
break;
}
}
if(f==0)
printf("\n NO");
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Which properties are used to bind a DataGridView control?
What do you mean by serialization and deserialization and it's use.
Why is the xml infoset specification different from the xml dom?
i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?
What is difference between metadata and manifest?
What is the class that allows an element to be accessed using unique key?
Explain managed code?
What is an assembly and its use?
Explain how to store decimal data in .net?
What is code security?
Explain cts?
What is the use of system.diagnostics.process class?
How to store images in sql server database through vb.net?
How a base class method is hidden?
Explain the difference between an xml "fragment" and an xml "document."