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 |
What is a pointer in c?
#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }
12 Answers Capital IQ, Sasken,
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
Juxtapose the use of override with new. What is shadowing?
What is the use of getchar() function?
How can I remove the trailing spaces from a string?
Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }
what are bps & baud rates? differentiate these two?
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
What are 3 types of structures?
What is the acronym for ansi?