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
Answer Posted / 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 |
Post New Answer View All Answers
Not all reserved words are written in lowercase. TRUE or FALSE?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
How can I handle floating-point exceptions gracefully?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Write a program to check whether a number is prime or not using c?
What are the functions to open and close file in c language?
In a switch statement, explain what will happen if a break statement is omitted?
Why c language is called c?
What are the types of data types and explain?
What is a pointer and how it is initialized?
How do I swap bytes?
What is meant by type specifiers?
What is the best way to comment out a section of code that contains comments?
What are the types of assignment statements?