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 ?

2329

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

1 3504

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

Wipro,

4 12928

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

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 4304

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.

2144

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

1 3789

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 .

1785

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

2 5390

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

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

ABC, Apple, C3I, HP, TCS,

6 21944

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:


What is a cdata section in xml?

378


What is XML DOM Document?

406


what does mbln in mblnrects mean? my boolean?

2517


Code for IP Address Comparison and Conversion in C#?

4072


Write code to add functions, which would work as get and put properties of a class?

584


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

2658


How to check if Folder is a Special Shell Folder ?

496


Code for Method of Handling Factorials of Any Size?

2095


What is a markup language?

435


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

4065