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 ?

2200

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

1 3370

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

Wipro,

4 12634

#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 22096

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 3987

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.

2040

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

1 3552

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 .

1700

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

2 5206

#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 6352

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

ABC, Apple, C3I, HP, TCS,

6 21401

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:


Write a python program to check if a number is an armstrong number?

460


Write a program to reverse a number in python?

453


Write a python program to check if a number is a palindrome or not?

443


how to pass data between pages using Cookies

1839


solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)

2920


How to encode and decode URL strings?

1782


Reading which Non-Character Key was pressed

1680


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

2313


Write a python program to print table of a given number?

452


Write a program that will convert an integer pointer to an integer and vice-versa.

513