How to reverse a String without using C functions ?
Answers were Sorted based on User's Feedback
Answer / snjui
#include<stdio.h>
#include<conio.h>
void main()
{
getch()
}
| Is This Answer Correct ? | 2 Yes | 14 No |
Answer / saurabh
int i=0,j=0;
while(str[i++))
{j++;}
i=0;
j--;
while(i<j)
{ char tmp;
tmp = str[i];
str[i]=str[j];
str[j]=tmp;
}
| Is This Answer Correct ? | 20 Yes | 40 No |
Answer / prof.muthu
#include<muthu.h>
main()
{
printf("\nthe reverse string is:",reversemuthu(s1);
}
output:
original string is: muthu
the reverse string is: uthum
Thanks and recgards:
prof.muthu ph:9962940220
you can call me any time any where...!
| Is This Answer Correct ? | 20 Yes | 138 No |
why array index always strats wuth zero?
Is the following code legal? typedef struct a { int x; aType *b; }aType
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
what is the code of the output of print the 10 fibonacci number series
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
Write a routine that prints out a 2-D array in spiral order
main() { show(); } void show() { printf("I'm the greatest"); }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Write a program to receive an integer and find its octal equivalent?