Pages: [1]   Go Down
  Print  
Author Topic: CodeStorm: [Title Removed]  (Read 596 times)
0 Members and 1 Guest are viewing this topic.
John Anderton
AXIS Core
*****

Karma: +11/-0
Offline Offline

Gender: Male
Posts: 621



View Profile WWW
« on: March 19, 2008, 12:01:59 am »

I went to bed tonight tired and content with the work I had done tonight. Just then I thought of something. I got up and immediately opened TC to write these 12 lines of code. Tell me if this makes any sense to you.

Code:
#include <stdio.h>
#include <conio.h>

void main()
{
int a = 0;
clrscr();
fprintf(stdin,"1");
scanf("%d",&a);
printf("\nValue of a = %d",a);
getch();
}

First question is, what am I trying to do? That will give you the title of the thread, which I've removed. Second question is what's wrong? Why don't I get the expected output. It should be possible to do. Pointless, may it be mostly, but possible none the less.

CodeStorm sounds like Brain Storming, doesn't it? That's what this is meant to be Smile
Logged

Vi Veri Veniversum Vivus Vici
KarunAB.com || Jatonian Life
Admin (Jan 12th 2008 - July 14th 2008)

Pages: [1]   Go Up
  Print  
 
Jump to: