C Code Interview Questions
Questions Answers Views Company eMail

#include main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

1 4004

#include main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }

1 4791

#include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }

Hexaware,

3 14241

#include main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

1 4892

main() { printf("\nab"); printf("\bsi"); printf("\rha"); }

3 30598

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

7 49062

#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }

Google, HCL, Quick Heal, WTF,

4 35299

main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }

3 13097

#include #define a 10 main() { #define a 50 printf("%d",a); }

2 16036

#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }

2 18267

main() { 41printf("%p",main); }8

1 4999

main() { clrscr(); } clrscr();

2 4032

enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

2 6643

void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

2 7366

main() { int i=400,j=300; printf("%d..%d"); }

3 5855


Post New C Code Questions

Un-Answered Questions { C Code }

how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3114


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2249


Write a program to model an exploding firecracker in the xy plane using a particle system

3679


Sir... please give some important coding questions asked by product companies..

1789


Cluster head selection in Wireless Sensor Network using C programming language.

3095






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

3698


write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??

4128


Develop a routine to reflect an object about an arbitrarily selected plane

2979


how to test pierrot divisor

2246


Write a routine to implement the polymarker function

4370


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.

2669


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

2909


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

2008


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

2851


write a program for area of circumference of shapes

2024