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
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What is the hardest programming language?
How do you generate random numbers in C?
How can you tell whether two strings are the same?
Describe the steps to insert data into a singly linked list.
Place the #include statement must be written in the program?
Explain how do you print only part of a string?
Write a program to reverse a given number in c?
Are the expressions * ptr ++ and ++ * ptr same?
Why C language is a procedural language?
Can you define which header file to include at compile time?
what is the structure pointer?
Between macros and functions,which is better to use and why?
explain what are pointers?
What is the advantage of an array over individual variables?