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

Write a program that can show the multiplication table.

0 Answers   Student,


What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

0 Answers  


1,1,5,17,61,217,?,?.

3 Answers   Apple,


please send me the code for multiplying sparse matrix using c

0 Answers  






What is #include stdio h and #include conio h?

0 Answers  


what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 Answers  


What is a struct c#?

0 Answers  


What happens if a header file is included twice?

0 Answers  


What is the difference between GETS();AND SCANF();

4 Answers   TCS,


program to print circle structure

1 Answers  


inline function is there in c language?

4 Answers  


Categories