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
Answers were Sorted based on User's Feedback
Answer / kuldeep singh
undefined function call as ctrcpy() and , missing in
function strcmp()
after editing we get 0 answer............
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / 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 |
Answer / santhoo035
if u write the write the code as i=strcmp(strcat(s3,ctrcpy
(s2,s1)),strcat(s3,"abcd")); then it will print 0
| Is This Answer Correct ? | 4 Yes | 2 No |
Write a function to find the area of a triangle whose length of three sides is given
What is self-referential structure in c programming?
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.
What character terminates all strings composed of character arrays? 1) 0 2) . 3) END
What is difference between structure and union?
What is null character in c?
Which is better oop or procedural?
write a c program to check weather a particluar bit is set or not?
What is the difference between functions getch() and getche()?
Can a variable be both const and volatile?
What are the types of macro formats?
What is multidimensional arrays