Search Results

Search: Posts Made By: sizzler786
Forum: Programming 09-30-2013
2,856
Posted By jim mcnamara
Please be more specific about 'what does not...
Please be more specific about 'what does not work'. There several issues in your code. Be sure to turn on warnings - example, using gcc:

gcc -Wall myprog.c -o myprog

This will help you. ...
Forum: Programming 09-30-2013
7,005
Posted By Scott
It's a bitwise and, meaning the resultant bits...
It's a bitwise and, meaning the resultant bits are one if the corresponding bits from both a and b are one, otherwise 0.

For example:

Dec Binary
---------------
179 10110011
217 11011001...
Forum: Programming 09-26-2013
7,005
Posted By Scott
It was very close :) #include <stdio.h> ...
It was very close :)

#include <stdio.h>
main()
{
int a = 128;
int b = 253;
int i;

for (i=7; i>=0; i--) {
if (b & a)
printf("1");
else
printf("0");
a = a >>...
Forum: Programming 09-26-2013
7,005
Posted By Scott
There are some fairly elementary syntax errors in...
There are some fairly elementary syntax errors in your code.

#include <stdio.h>
main()
{
int a = 128;
int b = 253;
int i;

for (i=7; i>=0; i--)
{
if (a & b >= 128)
...
Forum: Programming 09-24-2013
7,005
Posted By vbe
Are you sure your error is in that bit of code...
Are you sure your error is in that bit of code you submitted?
Can you show us the error message you get ?
Forum: Programming 09-24-2013
7,005
Posted By Don Cragun
It is always MUCH easier to help you solve...
It is always MUCH easier to help you solve problems like this if you show us the error message(s) you get when you post a question like this.

As a very wild guess, I'd say that you're trying to...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 02:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy