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 C program that reads a series of strings and prints
only those ending in "ed"

Answer Posted / antony from chennai

void main()
{
char *s[10];
int n;
printf("No of strings:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%s",s[i]);
}
for(i=1;i<=n;i++)
{
int len;
len=strlen(*s[i]);
len=len-1;
if(*s[len]='e' && *s[len--]='d')
{
printf("%s",*s[i]);
}
else
{
printf("no match");
}
}
getch();
}
}

Is This Answer Correct ?    4 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1757


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2625


Is array name a pointer?

1005


What do you mean by a local block?

1046


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

1282


Is c is a procedural language?

1045


What is structure pointer in c?

1005


Write a program to print fibonacci series using recursion?

1020


What are the advantages and disadvantages of a heap?

1159


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1022


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1103


How can you increase the size of a statically allocated array?

1054


What are 'near' and 'far' pointers?

995


Which built-in library function can be used to match a patter from the string?

1256


In a switch statement, explain what will happen if a break statement is omitted?

1011