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 a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

0 Answers   Aspire, Infogain,


How many header files are in c?

0 Answers  


What are file streams?

0 Answers  


How do you generate random numbers in C?

0 Answers  


34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?

3 Answers  






What are identifiers and keywords in c?

0 Answers  


question-how to run a c programme.

6 Answers  


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

0 Answers  


3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

3 Answers   Huawei,


Explain about C function prototype?

0 Answers  


Explain logical errors? Compare with syntax errors.

0 Answers  


What is function prototype in c language?

0 Answers  


Categories