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
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 |
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 |
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 |
what is the difference between exit() and _exit() functions?
What does %2f mean in c?
can we define a function in structure?
What is the use of volatile?
What are qualifiers in c?
Software Interview Questions
Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ?
which is faster execution: loops or recursion?
Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….
What is the difference between procedural and functional programming?
Write a program to print factorial of given number without using recursion?
c program for searching a student details among 10 student details