<hint>
Take fgets() statement out of the loop.
Type: Posts; User: cc0d3r
<hint>
Take fgets() statement out of the loop.
So is he having a problem with searching the board or turning of precompiled headers?
Exactly _what_ are trying to do ??
Not sure, if that's what you want, but here the ansi version:
#include <stdio.h>
int main( void )
{
int input;
do{
Use <> to include stdio.h in your code:
#include <stdio.h>
Post the code that you have so far.
The closest thing I can think of right now is ncurses library on UNIX.
HTH,
First and second are examples of the different styles of using '*' operator, but are otherwise equivalent.
fputs() expects a FILE * as its second argument, so use fputs("TEST", fp) instead.
1. There's no reason to redeclare k twice and in if-else tests use '==' operator to compare int variables.
Example:
void printAttitude(int k) /* declaration of k */
{
if(k == 1)
...
Yes, that's the book I initially started learning C from as well as K&R2. This chapter has enough example code on initializing and using mult. arrays. Once you've collected the data, it's trivial to...
No reason to worry. Just read your C book, try to understand the basics (for/while loops, array, functions) , look at the examples, etc. and I'm sure you'll be able to solve this problem ..
...
>And i still need help with the 3rd one
k=0;
do {
printf("*");
k++;
} while(k<97);
What part of this can't you understand, pick any anonymous ftp site, say ftp.xfree86.org and try to login as "guest".
This fails because the ftp software by default only accepts ftp/anonymous...
Just login as ftp with the password being some junk containing @ char.
Enjoy while you can ;)
It depends on what you want to accomplish. If you're just wanting to learn about the hacker techniques it might be easier to setup a lab and learn from that.
HTH,
ftp/anonymous is the standard login for the anonymous ftp. While guest might work for other types of network software, it isn't the case here.
Anyway, anonymous ftp on your school's server is...
KDE's KUser seems to what you're looking for ...
Try 'ftp' or 'anonymous' (no quotes) as the login.
http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Debug.html
>this will aviod buffer overflows (segmentation faults)<
Don't be so sure. strn* functions do not protect agains stupidity ;) :
int main(void)
{
char s[5];
strncpy(s, "A", 10);
}
Can you provide a little more info on that?
On Unix systems you can also use getpass from <unistd.h>:
#include <unistd.h>
int main(void)
{
char *p;
p = getpass("Password: ");
}
Never mind