Write a C program that reads a series of strings and prints
only those ending in "ed"
Answer Posted / mani
#include<stdio.h>
main()
{
char *a[6]={"sayed","jhsdj","manvi","buged","error"};
int i,j,k,h;
int flag=0;
for(i=0;i<5;i++)
{
j=0;
j=strlen(a[i]);
if(*(a[i]+3)=='e'&& *(a[i]+4)=='d')
{
printf("%s\n",a[i]);
}
else
{
printf("no match\n");
}
}
}
| Is This Answer Correct ? | 11 Yes | 11 No |
Post New Answer View All Answers
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
Can a pointer point to null?
What are variables c?
Can math operations be performed on a void pointer?
How can you invoke another program from within a C program?
In which header file is the null macro defined?
Why doesnt the call scanf work?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Is the exit() function same as the return statement? Explain.
What is queue in c?
What is the maximum length of an identifier?
What is unary operator?
What is calloc()?
What is the most efficient way to count the number of bits which are set in an integer?
Explain what is a pragma?