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 |
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is Generic pointer? What is the purpose of Generic pointer? Where it is used?
write a c program to convert fahrenheit to celsius?
to find out the reverse digit of a given number
6 Answers Infosys, Microsoft, TCS, Wipro,
what is mallloc()?how it works?
difference between semaphores and mutex?
Why c is a mother language?
What is use of pointer?
Explain what is the benefit of using an enum rather than a #define constant?
Describe the steps to insert data into a singly linked list.
void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?
Explain data types & how many data types supported by c?