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 |
What are segment and offset addresses?
main() { printf("%d", out); } int out=100;
Program to find the largest sum of contiguous integers in the array. O(n)
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
how to return a multiple value from a function?
Write a procedure to implement highlight as a blinking operation
Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30
print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!
35 Answers Tata Elxsi, TCS, VI eTrans,
Is the following code legal? typedef struct a { int x; aType *b; }aType
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
Derive expression for converting RGB color parameters to HSV values