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

Is boolean a datatype in c?

0 Answers  


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

0 Answers  


What are header files and explain what are its uses in c programming?

0 Answers  


What is the difference between abs() and fabs() functions?

0 Answers  


Is null always defined as 0(zero)?

0 Answers  






Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

0 Answers  


Explain what is gets() function?

0 Answers  


How can I implement sets or arrays of bits?

0 Answers  


52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?

25 Answers   Datamatics, Solartis, TCS, ThinkBox, Trine,


In how much time you will write this c program? Prime nos from 1 to 1000

2 Answers   TCS,


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 Answers   Mind Tree,


write c program to display output 10(10+20)+(10+20+30)+ ... n term

0 Answers   Hindustan Gum Chemicals,


Categories