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 ?

2205

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

1 3378

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

Wipro,

4 12655

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

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 4008

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.

2049

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

1 3571

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 .

1702

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

2 5221

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

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

ABC, Apple, C3I, HP, TCS,

6 21436

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 output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }

575


code to Hide and Show form controls

1808


What is XML Parser?

448


Hi, I want the code to fetch multiple rows in REXX using RLX and CURSOR. Can anyone help me?

2037


how to create a search bar which access data from various websites and retrieves the data

2551


What is xml schema?

338


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

2735


Code for Presenting Parent/Child Data in a Data Grid Row?

2107


Write a program that implements a date class containing day, month and year as data members. Implement assignment operator and copy constructor in this class.

537


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3359