Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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);
}

Answers were Sorted based on User's Feedback



What is the output for the following program #include<stdio.h> main() {..

Answer / sri

output is 1 but this prg display 2 warning (ie) Nonportable
pointer comparsion

Is This Answer Correct ?    6 Yes 1 No

What is the output for the following program #include<stdio.h> main() {..

Answer / 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

What is the output for the following program #include<stdio.h> main() {..

Answer / chanda_ni

1

Is This Answer Correct ?    4 Yes 2 No

What is the output for the following program #include<stdio.h> main() {..

Answer / jyothi

it gives syntax error

Is This Answer Correct ?    5 Yes 3 No

What is the output for the following program #include<stdio.h> main() {..

Answer / jaya prakash

0

Is This Answer Correct ?    3 Yes 2 No

Post New Answer



More C Interview Questions

Write a Program to accept different goods with the number, price and date of purchase and display them

0 Answers   HDFC,


Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 Answers  


program to find the roots of a quardratic equation

1 Answers  


Explain the difference between null pointer and void pointer.

0 Answers   TCS,


What is an expression?

0 Answers  






Eight queens puzzle

0 Answers  


Write a program using bitwise operators to invert even bits of a given number.

2 Answers  


write C code to reverse a string such that if i/p is "abc defg hij klmno pqrs tuv wxyz" and the o/p should be "cba gfed jih onmlk srqp vut zyxw"

2 Answers  


I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


What is const keyword in c?

0 Answers  


what is the use of c program?

4 Answers   Synergy, Web Synergies,


what is the diffrenet bettwen HTTP and internet protocol

0 Answers  






Categories