C Code Interview Questions
Questions Answers Views Company eMail

#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 15274

main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }

1 15014

main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }

CSC, GoDB Tech, IBM,

9 36344

main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }

1 6936

main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }

1 8079

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 9331

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

1 3697

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

1 5373

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

2 13152

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

1 5140

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 6264

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

1 5474

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

1 4597

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

1 5856

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

1 4878


Post New C Code Questions

Un-Answered Questions { C Code }

How to palindrom string in c language?

8836


why nlogn is the lower limit of any sort algorithm?

2373


could you please send the program code for multiplying sparse matrix in c????

3067


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

2325


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

2915






Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

2681


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

493


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

2219


write a simple calculator c program to perform addition, subtraction, mul and div.

3143


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

6306


#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

1067


how to test pierrot divisor

2256


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

3708


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

2380


Design an implement of the inputs functions for event mode

2957