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 |
How to print "Hi World" without using semi colon?
What is difference between structure and union in c programming?
how to print this pyramid * * * * * * * * * * * * *
Explain what is wrong in this statement?
What is the difference between constant pointer and pointer to a constant. Give examples.
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
What is type qualifiers?
What are near, far and huge pointers?
0 Answers Hexaware, Thomson Reuters, Virtusa,
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.....
Explain what is the benefit of using an enum rather than a #define constant?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Write a program to print the following series 2 5 11 17 23 31 41 47 59 ...