Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Wiki Search
Latest topics
» data mining and data warehousing
Assignment operation in if() statement EmptyMon May 20, 2013 3:30 pm by prabakumar

» mid questions
Assignment operation in if() statement EmptySat Apr 07, 2012 9:58 pm by ravitejachalla

» important questions
Assignment operation in if() statement EmptySat Apr 07, 2012 8:04 pm by tony

» racha blockbuster written all over. strong reports coming
Assignment operation in if() statement EmptyTue Apr 03, 2012 10:18 pm by tony

» celebration for 300 users
Assignment operation in if() statement EmptyTue Apr 03, 2012 9:36 pm by tony

» 8051 Microcontrollers
Assignment operation in if() statement EmptySun Feb 26, 2012 8:02 pm by shanthipriya

» panja video songs racha quality
Assignment operation in if() statement EmptySat Dec 17, 2011 1:21 am by tony

» first look of OO kodthaara ulikki padthaara?
Assignment operation in if() statement EmptyFri Dec 16, 2011 1:35 am by tony

» pawan kalyan panja HQ DVD quality rip
Assignment operation in if() statement EmptyThu Dec 15, 2011 4:22 pm by tony

» latest joke in movie circles
Assignment operation in if() statement EmptyWed Dec 14, 2011 8:39 pm by tony

April 2024
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    

Calendar Calendar

Statistics
We have 535 registered users
The newest registered user is jecase

Our users have posted a total of 478 messages in 434 subjects
Keywords

POLL
Your IP address

Assignment operation in if() statement

Go down

Assignment operation in if() statement Empty Assignment operation in if() statement

Post by Pruthvi Bharadwaj Mon Jul 07, 2008 7:24 pm

PROGRAM:
#include <stdio.h>
#include<conio.h>
void main()
{
int a;
if(a=5)
printf("This is if condition");
else
printf("This is else condition");
getch();
}

OUTPUT: This is if condition

REASON:
In C always an assignment operation returns a non zero value so the condition in if statement becomes true.
Pruthvi Bharadwaj
Pruthvi Bharadwaj
Administrator
Administrator

Number of posts : 291
Age : 33
Location : Tirupati
Reputation : 1
Registration date : 2008-06-13

http://a2zweb.friendhood.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum