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

which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1730


how many key words availabel in c a) 28 b) 31 c) 32

1084


What are types of functions?

1045


Why do we use namespace feature?

1063


Is it better to bitshift a value than to multiply by 2?

1094


What is an endless loop?

1284


How do you write a program which produces its own source code as output?

1125


What is the right way to use errno?

1060


Why is sprintf unsafe?

1085


What is the meaning of && in c?

1025


What is a nested formula?

1166


What is a good way to implement complex numbers in c?

1055


How many types of operator or there in c?

1100


What are the differences between new and malloc in C?

1154


What is a ternary operator in c?

1127