Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we initialize extern variable in c?

1144


What are the advantages of using new operator as compared to the function malloc ()?

1354


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2474


Explain what are multibyte characters?

1205


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1222


What is the use of #define preprocessor in c?

1081


Was 2000 a leap year?

1059


Explain about C function prototype?

1103


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1208


What is the difference between array and pointer in c?

1168


What are the data types present in c?

1168


What is int main () in c?

1094


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2364


What is %lu in c?

1265


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1244