You are not logged in.

#1 2015-09-16 05:01:53

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

C Language Arrays And Strings Program:

C Programming Quizzes C Language Arrays And Strings

Directions:
What will be the output of the following program?

Question:
void main()
{
      char str1[] = "abcd";
      char str2[] = "abcd";
      if(str1==str2)
            printf("Equal");
      else
            printf("Unequal");
}

Option A):
Unequal 
Option B):
Error
Option C):
Equal
Option D):
None

Correct Answer is Option A):
Unequal


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-16 05:01:53

Advertisement
Ads By Google

Re: C Language Arrays And Strings Program:



\n

Board footer