BCA

C LAB :PART A

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10

C LAB : PART B

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10

Write a C Program to Reverse a String using Pointer

    
 /* Write a C Program to Reverse a String using Pointer */



    #include 
    #include 
    void main()
    {
    	char *s;
    	int len,i;
    	clrscr();
    	printf("\nENTER A STRING: ");
    	gets(s);
    	len=strlen(s);
    	printf("\nTHE REVERSE OF THE STRING IS:");
    	for(i=len;i>=0;i--)
    		printf("%c",*(s+i));
    	getch();
    }