User Profile

Collapse

Profile Sidebar

Collapse
amanda22
amanda22
Last Activity: Dec 3 '07, 02:17 AM
Joined: Nov 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • amanda22
    replied to code output
    in C
    Guys,

    I am desperate, I have tried to input this and the other programs I am working on that are similar and I don't know why it isn't working. On this problem, I am supposed to input abcdefghi and my only possible solutions are a. abc b. d c. /abc or d. /efghi

    2) Another one I can't get to work is what is supposed to happen when the following code is entered:

    char Ch;
    Ch='7';
    printf("%d\n",...
    See more | Go to post

    Leave a comment:


  • amanda22
    replied to code output
    in C
    So, I know this still might be silly, but I am still confusing how this is put into the compiler.

    I would have to enter it as:

    int main()
    {
    char Ch='/';
    while (Ch !='d')
    {
    putchar(Ch);
    Ch=getchar();
    }

    As you can see, I am missing something, and that is where I am stuck. My textbook does not really address this.

    ...
    See more | Go to post

    Leave a comment:


  • amanda22
    started a topic code output
    in C

    code output

    I know this is probably something silly, but I am missing something. I put the following into my compiler and I am not getting it. I know I need something to make this work, because everyone else is getting it. My project is to enter the following into the compiler and tell what the output would be (like 'abc').

    char Ch='/';
    while (Ch !='d')
    {
    putchar(Ch);
    Ch = getchar();
    }
    ...
    See more | Go to post

  • amanda22
    started a topic Doing binary conversions by hand

    Doing binary conversions by hand

    I am having a time with these problems:

    X=1100110000110 011
    Y=0000111100001 010

    1) what would I get in binary representation for X<<5?

    2) what is the two's complement of negative Y (-Y)?

    3) If X is an int variable, what do we know about the value of X&X?
    a. It is always equal to X.
    b. It is always greater than 1.
    c. It is always equal to...
    See more | Go to post

  • amanda22
    started a topic enum fuzzy
    in C

    enum fuzzy

    I have the following question I am working on, and I'm not sure what they are asking.

    Write a C statement which defines an enumeration type fuzzy consisting of values false, maybe, and true . Defined so that maybe is greater in value than false but less than true .
    See more | Go to post

  • amanda22
    started a topic Expressions
    in C

    Expressions

    Hi,

    If I were given this declaration:

    int N;
    float X;

    what type of expression would X%N be? int, float, or double or can a float be used with %?
    See more | Go to post

  • amanda22
    replied to Expression
    in C
    Thanks Rick, that's pretty much what I thought...it would stay an int. I guess the float just got me thinking.
    See more | Go to post

    Leave a comment:


  • amanda22
    started a topic Expression
    in C

    Expression

    Hi all,

    I have the following declaration and initialization:

    int n = 8;
    int z = 2.0;

    I know it would be 8, but I am trying to find out if the expression of z=n would be still considered an int, float, double, our unsigned.
    See more | Go to post
No activity results to display
Show More
Working...