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 |
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
What is indirect recursion? give an example?
Explain spaghetti programming?
Why are algorithms important in c program?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
When is an interface "good"?
What is a substring in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
i have a written test for microland please give me test pattern
What is keyword with example?
What is the use of a semicolon (;) at the end of every program statement?
how would a 4*3 array A[4][3] stored in Row Major Order?