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 switch in c?
What is a void pointer? When is a void pointer used?
How can I sort a linked list?
What does dm mean sexually?
What standard functions are available to manipulate strings?
What is assignment operator?
Can you tell me how to check whether a linked list is circular?
What does the error 'Null Pointer Assignment' mean and what causes this error?
all c language question
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
Linked lists -- can you tell me how to check whether a linked list is circular?
Is null always defined as 0(zero)?
What are qualifiers and modifiers c?
Why main function is special give two reasons?
Explain how can you check to see whether a symbol is defined?