Is there anyway to correct that? Like reseting scanf after the signal handler or something?
Type: Posts; User: NeMewSys
Is there anyway to correct that? Like reseting scanf after the signal handler or something?
guys can you tell me why scanf acts wierd with this SIGINT signal? (see the comments at the bottom of the code to see how it acts) Click here to see the code
I'm studying the principles of a primitive browser.
I want to receive the source code of a webpage. I know little about this but i need to send some headers right?
I would like to do it by using...
When i do char *s = malloc(5); the final result is:
[][][][][\0]
or just:
[][][][][] ?
Lol, i said a big mistake, in assembly i used 8 digits in Hex to represent one char, it means 16 bits = 1 char.. ;)
Doesnt the size used to represent data changes from machine to machine? Standard char can take 1 byte, but on other machine it can take more, or am i wrong?
Why does malloc works in bytes not in bits?
In assembly one char took me just 4 bits (one word).
I got confused with some examples,
wich one is correct?
char s = malloc(81);
or
char s = malloc(81*sizeof(char));
I once made a script in C to receive a file name as argument in *argv and using fopen i would read each char until EOF. At the same time i would be calculating its size using sums.
I cant remeber...
Its not a problem based question, just curiosity out of the box.
Thanks! ;)
I know that we have structs, arrays and so on to avoid this, but only curiosity.
In PHP (C based) i could create random variable names like $varXXX, where XXX is a random number. And i could do...
I cant find any example that shows how it works and what are is advantages.
What you mean by passing a function as argument to another function? How does it work?
Thanks!
true.
they could do it like o123 instead of the actual 0123. The 'o' meaning 'octal base'
x << 2 is the same as this:
#define lol 2
x <<= 2
?
that was my fear.
Every number that begins with a zero is octal by default?
One last thing, in all the examples where i see that the programmer compares the last bit of X with 1, they do it this way:
if ( x & 01) ...
in php i used to do this way if (x & 1)...
are they...
Wait, i got confused now about a thing, in your example you show the int x with 8 bits
0000 0000 = 8bits
Does int has 8 bits or 16 bits?
wich bit is the "negative flag" of the int?
Ps. I...
I'm learning how to work with binaries in C.
I tested this code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
I'm learning C finally :D
I heard somewhere that #define a 20 is better than doing a=20;
But never got it why.
Can you explain me the advantages of using #define instead of a=20?
(You can...
As for that, i didnt mention before but i printed your code to have a closer look when i tested it ;)
Thanks again!
Thank you very much 39ster!! It works very well! Thank you! ;)
I'll ask some friend of myne to do it then....
Does every DLL need to be installed? His presence in the same folder as the .EXE is not enough?
...
Can you help me or not? Is this something against VB or something... is this some kind of religion? ....... -_-