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...

What is the output for the following program

#include<stdio.h>
main()
{
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}

Answer Posted / vignesh1988i

FLAG WILL give zero.....
because a refers to the 2D array's base address, *a refers to the value at the 0th row and 0th column.... so this address will not match the ascii value of the char 'A'.... so however it is logical AND so, the value is 0.........



thank u

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a proram to reverse the string using switch case?

3006


Explain what math functions are available for integers? For floating point?

1160


List the difference between a "copy constructor" and a "assignment operator"?

1067


Explain what is the most efficient way to store flag values?

1271


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16918


What are the uses of null pointers?

1196


What is a pointer in c?

1695


What is character set?

1216


What is c language in simple words?

1113


explain what are pointers?

1080


What is operator promotion?

1130


In a switch statement, explain what will happen if a break statement is omitted?

1123


What is d'n in c?

1175


Explain what are the different data types in c?

1265


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1479