n is string length value say (string is a = Test, lenght n=4). Characters will start at index 0 so string starts like a='T', a='e', a='s', a='t', a='\0'. When you try to print a character then '\0' will print and you need to go till a
I have modified your code with bit changes as below.
int n, i = 0;
printf("enter the string : ");
n=strlen(a);//Find length of string
printf("The lenght of string is : %d \n",n);
printf("The reversed string is : ");
for ( i = (n-1); i>=0; i-- )
printf("%c",a[i]);//Printing character from last
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...