11. 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



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

Answer / subha

answer:c

Is This Answer Correct ?    9 Yes 0 No

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

Answer / raja

answer is 0....ie the right option is (C)

Is This Answer Correct ?    7 Yes 0 No

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

Answer / student

In that Program

i=strcmp(strcat(s3,strcpy(s2,s1),strcat(s3,"abcd"));

then it results 0

Is This Answer Correct ?    3 Yes 0 No

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

Answer / anand

#include<string.h>
main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
i=strcmp(strcat(s3,strcpy(s2,s1)),strcat(s3,"abcd"));
//i=strcmp(strcat(s3,strcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
return 0;
}

ans:0
strcpy(efgh,abcd)=efghabcd
strcat(efgh,abcd)=efghabcd

Is This Answer Correct ?    2 Yes 0 No

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

Answer / basha

No out put will come bcoz errors are there in the program

Is This Answer Correct ?    1 Yes 1 No

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

Answer / mohan

answer would be B) a non integer b/c first strcat returns
"abcdefg" and second strcat returns "efghabcd" when compared
these two strings the output is non interger value

Is This Answer Correct ?    0 Yes 3 No

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

Answer / priya

Answer is d

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More C Interview Questions

What is the difference between int main and void main?

0 Answers  


What are register variables? What are the advantage of using register variables?

0 Answers   TISL,


void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?

4 Answers   Groupon,


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

0 Answers  


What are disadvantages of C language.

0 Answers   iNautix,






What is the use of bitwise operator?

0 Answers  


differnce between do and do while

3 Answers   DOEACC,


Describe the difference between = and == symbols in c programming?

0 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

0 Answers  


What is the Lvalue and Rvalue?

2 Answers  


Write a program to identify if a given binary tree is balanced or not.

0 Answers   JPMorgan Chase,


What is the correct code to have following output in c using nested for loop?

0 Answers  


Categories