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
Answer Posted / 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 |
Post New Answer View All Answers
What is the right type to use for boolean values in c? Is there a standard type?
What are the properties of union in c?
what do you mean by enumeration constant?
What is pointers in c?
What is a global variable in c?
How the c program is executed?
What is "Hungarian Notation"?
What does dm mean sexually?
What are external variables in c?
Write a code to generate divisors of an integer?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is a substring in c?
Can you return null in c?
What is meant by high-order and low-order bytes?
What is memcpy() function?