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


Please Help Members By Posting Answers For Below Questions

What are the benefits of organizational structure?

574


Is null always defined as 0(zero)?

615


How do we make a global variable accessible across files? Explain the extern keyword?

1422


c program to compute AREA under integral

1811


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

598






What are external variables in c?

546


What is the difference between call by value and call by reference in c?

619


Which programming language is best for getting job 2020?

605


What is zero based addressing?

715


What are the 5 organizational structures?

569


find out largest elemant of diagonalmatrix

1649


What are the three constants used in c?

546


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

1848


What are the advantage of c language?

552


What is the difference between memcpy and memmove?

605