Thank you so much Subsonics, that really helped me understand. I wasn't even thinking about right shift. It completely slipped my mind. Thanks to everyone else too. I will probably be back in a...
Type: Posts; User: fiendslyr
Thank you so much Subsonics, that really helped me understand. I wasn't even thinking about right shift. It completely slipped my mind. Thanks to everyone else too. I will probably be back in a...
The user just inputs a passphrase, for example foobar and I have begin with masking it. First I have to isolate the 15th bit and check if its 1. Then I isolate the 14th bit and check if that is 1. I...
correction: I actually have to mask the passphrase the user has inputted not the actual character. however, I would still appreciate help on how to mask. For example, I have to turn off all bits in...
I am writing a function for a program that encrypts and decrypts a file. For encryption, I have to read a character from a file and check if bit 15 is a 1. If it is, its printed to one file. If its...
delete
alright, I have been able to get the nibble values. I was thinking of writing a function to test the nibble values against the input value. something like
testnibble(number, nibble, value)
...
alright, thank you so much. I understand the masking and it is working on my program right now. Now i have to do that for all the nibbles in the value and then check to see if it matches the user...
well I kind of know how to get the nibble values. I am still confused on it though. The whole masking thing is still strange to me. Am I correct to use the & operator to mask? If so, how would I go...
oh, ok. Understood. But how do I get the program to check nibble values? Is this where I would have to mask the items in the file so the program can check and compare each nibble value with the user...
I'm not following you. I'm slightly confused. I would use the & operator to mask the bits. But what would I use == for?
I know how to do that, using the &. However, I do not know how to check for the same value as the input and find the matches.
I am to write a program that opens a file (input.txt) that contains unsigned values. The program has to ask the user for a couple of commands. The first command is "f <value>". This will mean that...
Thank you for those tips. For some reason though, my code didn't like to display unless i used the flushes. Also, thanks for the switch tip, I completely forgot about that. I'll redo the code to do...
/*
* minicalc.c
*
* Created on: Sep 13, 2009
* Author: Varin
*/
#include<stdio.h>
#include<stdlib.h>
int main()
fflush made it work. thank you so much. now i can move to the rest of the program.
yes i did.
#include<stdio.h>
#include<stdlib.h>
int main()
{
//declared variables for choices, result, and inputed numbers
char operation;
double operand1;
All the code is correct and I am rebuilding each time and there are no other running instances. It seems that for me to get the program to actually start, I have to press enter.
thanks. yea, i figured out that it was still running.
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
//declared variables for choices, result, and inputed numbers
char operation;...
ok, at this point, i tried to compile it and it gave a build error in eclipse. "file minicalc.exe: Permission denied" why would it give me that error? i tried deleting it and creating a new one and...
#include<stdio.h>
#include<stdlib.h>
int main()
{
printf("Enter the operation of your choice:\n"
"a. add s. substraction\n"
"m. multiply d. divide\n"
"q. quit"); /*displays...
I am trying to create a program, in c, that will do that following:
It displays "Enter the operation of your choice: a. add s. subtract m. multiply d. divide q. quit"
It asks for the input from...