Code Snippets Interview Questions
Questions Answers Views Company eMail

Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?

2423

how to retrive the content from the file using vb.net

1 3628

how do i copy textbox contents of 1 form to another form

Wipro,

4 13206

#include void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

Wipro,

1 22963

1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?

2 4550

Hello, I am trying to write a program in c++ which accepts month and year from the user and prints the calender. So please tell me the algorithm and what is the calender logic.

2239

can u give me the c codings for converting a string into the hexa decimal form......

1 4190

i am doing my final year project about programming use verilog ,i am new about it so got problem,i want to record the readings of a waveform every 2us use the verilog code ,every ten readings i need to add them together after that i need to compare this series of number to get which one is the biggest , right now i don't know how to use code to store the readings every 2us on a waveform ,pls help me thanks a lot .

1832

how to generate Question paper and how to save pattern of question paper

2 5536

#include"math.h" void main() { printf("Hi everybody"); } if will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?

2 6838

how to find out the maximum number out of the three inputs.

ABC, Apple, C3I, HP, TCS,

6 22369

I have a doubt regarding including tags in a function. I have written a function in javascript in a html page. The function got called by clicking a button, i want to display the results in same html page by placing tags in the function. (this hmtl page is static page) Is this possible? example:


how to pass data between pages using Cookies

2037


Create a ViewState Property?

2435


Write a python program to check if a number is a perfect number?

659


how to track links visited in google using iframes

2438


How can export database using php code?

1715


How to palindrom string in c language?

9758


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2409


What is XML Element?

487


Design a timer circuit using VHDL which has the following: input : start_timer(ST) output: long_time(LT) short_time(ST) when the timer is triggered by the ST(either 0 or 1) signal the timer should generate two timing signals accordingly.While the long time is going ON the other should be OFF and vice versa.

2224


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3335