Programming Code Interview Questions
Questions Answers Views Company eMail

void pascal f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } void cdecl f(int i,int j,int k) { printf(“%d %d %d”,i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }

1 9320

What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 3684

main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 5359

main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 13118

Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 5136

What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }

1 6255

typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 5458

#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 4590

#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 5848

What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 4874

void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }

1 5173

int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }

1 8209

main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

IBM, TCS, UGC NET, Wipro,

29 44093

main() { int i=5; printf("%d",++i++); }

1 3641

main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }

1 5081


Un-Answered Questions { Programming Code }

How to get Dynamically Linked Comboboxes Set?

2018


Common UI for Multiple web applications. Suppose there are 35 websites using same third party controls.These 3rd party controls are made together that all 35 websites can use these controls.If we put all 3rd party controls and use its dll in 35 websites,only class files will be accessable. But I want to use CSS,images also in all 35 websites. how I can design the N-tier solution for this project.

2243


How to find No of classes,Packages,No of Methods per Classes and Depth of Inheritance for selecting source code in windows form application using c# .net? (Source code is input Program. It may be Java or .net) Please help me..) Thanks..)

2219


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

513


write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n

2359






How can you relate the function with the structure? Explain with an appropriate example.

2912


Write a function which accepts list of nouns as input parameter and return the same list in the plural form. Conditions: i) if last letter is r then append s ii) if word ends with y then replace it by ies iii) call this function in main() and produce the required output. for eg:- if chair is input it should give chairs as output.

3984


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

6303


Using C# Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9 The program should check the high number that the user inputs to ensure that it does not exceed the size of any array you might be using for storage.

3699


U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133…139,213,313,…913 all these will be counted)

2115


1.Why does only one copy of a servlet object get created? What happens if you want to remove an old servlet object currently running but do not want to stop the entire servlet engine? 2.How does one servlet object deal with interactions from many browser? (e.g. if your servlet ran an email site, how can it keep track of hundreds of users logging in, reading their mail, etc.)

2372


How to run the Result Intemation System project in java for collage student in which result of internal exam marks send on parents mobile using SMS? what software required to run this project? please reply immediately...

2592


write a program in java to solve a system of n-variabled simultaneous equations using the guassian elimination method. let the maximum possible value of n be 100. run the program using hypothetical values for a set of 10- variables simultaneous equations. print out the program, the input equation and the results generated by the program.

4194


what are the other loops except for for,while,do while and until?

2278


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7017