Solved

1<i

Posted on 2007-03-19
5
137 Views
Last Modified: 2010-04-15
BitWise
int andmask;
             for(i = 15;i >=0;i--)
             {
                   andmask =int 1<i;
                    printf("\n **** AndMask : ",andmask);
             }


Question :
1 ) What is the Meaning of  " int 1 < i " ?
 
0
Comment
Question by:gauravflame
  • 3
  • 2
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18746889
it casts the result of (1 < i)  which returns a boolean value into int, ie 0 (false) and -1 (false)
0
 

Author Comment

by:gauravflame
ID: 18746913
anything else is true ,except 0 & -1 which are false
I am right
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 18746918
no. only 0 is evaluating to false. everything else (including -1) is true
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18746920
0
 

Author Comment

by:gauravflame
ID: 18746925
fine , thanks
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question