Code Snippets Interview Questions
Questions Answers Views Company eMail

main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 12332

main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 7488

main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }

3 8143

main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }

2 12144

main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 3623

main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 15541

main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }

1 4514

#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 7014

int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }

CSC,

2 11194

main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 12130

main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

2 7995

main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

CSC,

1 10390

main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 8785

main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }

CSC,

4 28469

#include main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr 1 5010



Un-Answered Questions { Code Snippets }

how to create Expandable and Collapsible Menus

2647


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.

2242


write a code that user can choose/alter Body Text Size

1600


What is a cdata section in xml?

322


Create a ViewState Property?

2277






Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2057


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

3112


Write a python program to find the second largest number in a list?

475


How can i know that how many user are visited to my page in php?

1607


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2206


program to bring a window to the front

1555


how to insert fname,lname,designation values into database while click on the submit button using windows authentication mode?

2189


create a .dll component operation and use created component in another project. required methods events and properties. connect, add,search,data report

2084


3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...

4339


What is well formed XML document?

358