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
List the difference between a "copy constructor" and a "assignment operator"?
What extern c means?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
Describe the steps to insert data into a singly linked list.
What are the features of c languages?
Write a program to print factorial of given number without using recursion?
What is scanf_s in c?
Is c# a good language?
Which programming language is best for getting job 2020?
what is the structure pointer?
Can we assign integer value to char in c?
Explain how do you declare an array that will hold more than 64kb of data?
How can I write functions that take a variable number of arguments?
Is there a built-in function in C that can be used for sorting data?
What is the maximum length of an identifier?