×

# how to calulate compilation time??

 0 1>how to calulate compilation time?? 2>wht is the concept of input fie & output file??and string in printf statement is considered as output aswell?? asked 14 Oct '12, 23:51 1●1●1●1 accept rate: 0%

 1 1>how to calulate compilation time?? You don't care about compile time (this is the time, how long your source code is compiling f.e .cpp -> .exe or .java -> .class). Limit is for running time, here you can roughly assume, that you can do 10.000.000 operation in second (I/O could be problem is some languages) 2>wht is the concept of input fie & output file?? I assume you are writing about program testing. When you have test.exe and you call test.exe < test.in  your program works exactly the same as you are typing input to your program, but this input is from file. In deeper detail, if your program needs to read 3 integers a, b, c, you can have test.in file 10 20 30  and program test.cpp int main() { int a, b, c; scanf( "%d", &a ); scanf( "%d", &b ); scanf( "%d", &c ); return 0; }  will read the numbers from input file. Is that what you wantedto know? string in printf statement is considered as output aswell?? similarly to < test.in' you can do test.exe < test.in > test.out  and your output program will be in test.out file. Internaly CodeChef use it that way and for correct answer it compares test.out generated by your program with the correct one. That means if your program contains printf( "insert number: "); scanf( "%d", n ); ` than "insert number" string is in test.out file (try it (-; ), so such program is considered as incorrect - it prints something that problem statement didn't ask for... answered 15 Oct '12, 13:27 16.9k●49●115●225 accept rate: 11%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,427

question asked: 14 Oct '12, 23:51

question was seen: 1,267 times

last updated: 15 Oct '12, 13:27