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

Can you please explain the difference between system.string and system.stringbuilder classes?

996


i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate

2308


What is the difference between static or dynamic assemblies?

976


Described strong typing and weak typing?

1024


What is the importance of a Button control?

1273


What is meant by jagged arrays?

988


What are the technology areas that microsoft.net contains?

969


Can you please explain the difference between int and int32?

1017


How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently

2463


What is portable executable?

1128


Explain jagged array in vb.net?

948


What are the differences between c# and visual basic.net?

993


Explain about Visual basic.NET culture?

963


Explain the difference between import system.data.sqlclient and system.data.oledb?

966


Which classes a dll can contain?

945