Log in
Search
Wiki Search
Latest topics
Most Viewed Topics
Statistics
We have 535 registered usersThe 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
Page 1 of 1
Assignment operation in if() statement
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.
#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.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Mon May 20, 2013 3:30 pm by prabakumar
» mid questions
Sat Apr 07, 2012 9:58 pm by ravitejachalla
» important questions
Sat Apr 07, 2012 8:04 pm by tony
» racha blockbuster written all over. strong reports coming
Tue Apr 03, 2012 10:18 pm by tony
» celebration for 300 users
Tue Apr 03, 2012 9:36 pm by tony
» 8051 Microcontrollers
Sun Feb 26, 2012 8:02 pm by shanthipriya
» panja video songs racha quality
Sat Dec 17, 2011 1:21 am by tony
» first look of OO kodthaara ulikki padthaara?
Fri Dec 16, 2011 1:35 am by tony
» pawan kalyan panja HQ DVD quality rip
Thu Dec 15, 2011 4:22 pm by tony
» latest joke in movie circles
Wed Dec 14, 2011 8:39 pm by tony