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

what are the advantages & disadvantages of unions?

2 Answers  


What is page thrashing?

0 Answers  


what is array?

8 Answers  


When should you use a type cast?

0 Answers  


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

0 Answers  






write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC

2 Answers   HCL,


Explain Function Pointer?

0 Answers   Wipro,


What is line in c preprocessor?

0 Answers  


what does exit() do?

3 Answers   Cadence,


what do u mean by Direct access files? then can u explain about Direct Access Files?

0 Answers   LG Soft,


If the size of int data type is two bytes, what is the range of signed int data type?

0 Answers  


Which is better pointer or array?

0 Answers  


Categories