Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which properties are used to bind a DataGridView control?

1124


What do you mean by serialization and deserialization and it's use.

1061


Why is the xml infoset specification different from the xml dom?

930


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 ?

2673


What is difference between metadata and manifest?

1104


What is the class that allows an element to be accessed using unique key?

1138


Explain managed code?

963


What is an assembly and its use?

1023


Explain how to store decimal data in .net?

1179


What is code security?

1044


Explain cts?

962


What is the use of system.diagnostics.process class?

1066


How to store images in sql server database through vb.net?

942


How a base class method is hidden?

1097


Explain the difference between an xml "fragment" and an xml "document."

915