Array is Acrostic Or Not In C Program Tamil


//www.tutorjoes.com
#include<stdio.h>
#include<conio.h>
void main()
{
    int i,j,n,k=1;
    char a[100][100];
    clrscr();
    printf("\nEnter the limit :");
    scanf("%d",&n);
    printf("\nEnter the string :");
    for(i=0;i<n;i++)
    {
       scanf("%s",a[i]);
    }
    for(i=0;i<n;i++)
    {
       for(j=0;j<n;j++)
       {
	   if(a[i][j]!=a[j][i])
	   {
	      k=0;
	   }
       }
    }
    if(k==1)
    {
      printf("\nGiven array is ACRostic ");
    }
    else
    {
      printf("\nGiven array is not acrostic ");
    }
    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