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",...
User Profile
Collapse
-
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.
...Leave a comment:
-
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();
}
... -
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... -
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 . -
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 %? -
Thanks Rick, that's pretty much what I thought...it would stay an int. I guess the float just got me thinking.Leave a comment:
-
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.
No activity results to display
Show More
Leave a comment: