Solved

1<i

Posted on 2007-03-19
5
136 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 142

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 142

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 142

Expert Comment

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

Author Comment

by:gauravflame
ID: 18746925
fine , thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get time_t value that is a week old 6 168
Which version of C should I use when Perl is too slow? 13 181
negation in C function 14 153
sameEnds challenge 3 156
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now