write a programe returns the number of times the character
appears in the string
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
char a[50],q;
int count =0;
printf("enter the sring :");
gets(a);
printf("enter the char. to be searched :");
scanf("%c",&q);
for(int i=0;a[i]!='\0';i++)
{
if(a[i]==f)
count++;
}
printf("the occurance is :%d",count);
getch();
}
| Is This Answer Correct ? | 3 Yes | 4 No |
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Develop a program that computes the new price of an item. The program should receive a character variable colour and a double precision floating-point variable price from the user. Discount rate is determined based on the colour of the discount sticker, as shown in the following table. An error message should be printed if an invalid colour has been entered
write a program that eliminates the value of mathematical constant e by using the formula e=1+1/1!+1/2!+1/3!+
Write a program to find the biggest number of three numbers in c?
How do I send escape sequences to control a terminal or other device?
can i know the source code for reversing a linked list with out using a temporary variable?
i want to know the procedure of qualcomm for getting a job through offcampus
What is c language & why it is used?
Why is c so important?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
which operator having lowest precedence?? a.)+ b.)++ c.)= d.)%
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,