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 / vikram
the question is not correctly written;
undefined ctrcpy,no commas,no header file stdio.h;
if it is correctly written,then the output will be 0 since
the strings efghabcd match and we know that strcmp returns 0
if the two strings match
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is local and global variable in c?
Explain what does the function toupper() do?
What is structure in c explain with example?
How does sizeof know array size?
What is the difference between %d and %i?
What are the types of assignment statements?
How can I find the modification date of a file?
What is the difference between functions getch() and getche()?
How can I find the modification date and time of a file?
What is multidimensional arrays
What are linked lists in c?
Where register variables are stored in c?
Why do we use main function?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
Does c have circular shift operators?