11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
Answers were Sorted based on User's Feedback
Answer / student
In that Program
i=strcmp(strcat(s3,strcpy(s2,s1),strcat(s3,"abcd"));
then it results 0
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / anand
#include<string.h>
main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
i=strcmp(strcat(s3,strcpy(s2,s1)),strcat(s3,"abcd"));
//i=strcmp(strcat(s3,strcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
return 0;
}
ans:0
strcpy(efgh,abcd)=efghabcd
strcat(efgh,abcd)=efghabcd
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / basha
No out put will come bcoz errors are there in the program
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / mohan
answer would be B) a non integer b/c first strcat returns
"abcdefg" and second strcat returns "efghabcd" when compared
these two strings the output is non interger value
| Is This Answer Correct ? | 0 Yes | 3 No |
can any one tell that i have a variable which is declared as static but i want this variable to be visible to the other files? how?
hi any body pls give me company name interview conduct "c" language only
write a code for large nos multilication (upto 200 digits)
array of pointer pointer to array pointer to pointer
How do you determine the length of a string value that was stored in a variable?
i got 75% in all semester am i eligible for your company
What is string concatenation in c?
What is a list in c?
Is multithreading possible in c?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
what are bps & baud rates? differentiate these two?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }