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



Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

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

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

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

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

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

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

Answer / guest

Syntax error at line strcmp.....

Is This Answer Correct ?    2 Yes 2 No

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

Answer / ayyanar.m

garbage

Is This Answer Correct ?    0 Yes 0 No

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

Answer / rishab

Answer is 0, if you will correct the syntax

Is This Answer Correct ?    0 Yes 0 No

Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10..

Answer / jitendra kumar arya

c)0

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Interview Questions

Differentiate between functions getch() and getche().

0 Answers  


4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...

3 Answers  


Explain can you assign a different address to an array tag?

0 Answers  


What do the functions atoi(), itoa() and gcvt() do?

0 Answers   Aspire, Infogain,


What are operators in c?

0 Answers  






What is the right type to use for boolean values in c?

0 Answers  


Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


Is swift based on c?

0 Answers  


Not all reserved words are written in lowercase. TRUE or FALSE?

0 Answers  


compute the nth mumber in the fibonacci sequence?

10 Answers   Canon, HPL, Satyam, TCS,


What is calloc malloc realloc in c?

0 Answers  


what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code????????

2 Answers   Apple,


Categories