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
Is it possible to have a function as a parameter in another function?
Explain 'bus error'?
what is the structure pointer?
What is data structure in c and its types?
What is use of pointer?
How do I create a directory? How do I remove a directory (and its contents)?
What are preprocessor directives in c?
What are the advantages of c preprocessor?
How to find a missed value, if you want to store 100 values in a 99 sized array?
What is #define size in c?
Can we access the array using a pointer in c language?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
using only #include
What does sizeof function do?