Advertisement

The Net's most wanted Bugs

Started by March 12, 2003 01:43 PM
9 comments, last by llvllatrix 21 years, 11 months ago
Here's some bugs that I have bumbed into when I was learning c/c++.


    #include <stdio.h>int main(){  // This prints 5432 not 54321. So where did the last digit go?  printf("%d\n", 5432l);  // This prints "Invalid version!". I wonder what went wrong...  float version=1.1;  if (version==1.1) printf("Correct version!\n");  else printf("Invalid version!\n");  // This prints "File not found!", although the file exists.  FILE *file=fopen("c:\newfiles\test.txt", "r");  if (!file) printf("File not found!\n");  return 0;}    


[edited by - circuit on March 13, 2003 6:05:36 PM]

This topic is closed to new replies.

Advertisement