Character Count In C Program Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
	char *a,ch,k=0;
	int i,cou[100];
	clrscr();
	printf("\nEnter the string :");
	gets(a);
	printf("\nEnter the character:");
	scanf("%c",&ch);
	for(i=0;a[i]!='\0';i++)
	{
		if(a[i]==ch)
		{
		  cou[k]=i;
		  k++;
		}
	}
	for(i=0;i<k;i++)
	{
		printf("\na[%d]=%c",cou[i],a[cou[i]]);
	}
	getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming