String copy logic in one line.
Answers were Sorted based on User's Feedback
Answer / jitendra
void cpy_user(char *s, char *t)
{
while ((*s++ = *t++) != '\0');
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Answer / anurag
SORRY !!!
The last posted Ans. is for reverse of the string in one
line...by mistake it has been posted in this.
| Is This Answer Correct ? | 4 Yes | 5 No |
Answer / anurag
int i=0,len=strlen(str);
int j=len/2;len--;
while(i<j)
{
*(str+i)^=*(str+len)^=*(str+i)^=*(str+len);
len--;i++;
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Answer / vijay
strpy(n1,n2)
here copy of string n2 in string n1
| Is This Answer Correct ? | 12 Yes | 24 No |
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
Derive expression for converting RGB color parameters to HSV values
How to palindrom string in c language?
could you please send the program code for multiplying sparse matrix in c????
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
main() { int a[10]; printf("%d",*a+1-*a+3); }
How to return multiple values from a function?
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
main() { clrscr(); } clrscr();