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 12335

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

1 7492

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

3 8144

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

2 12146

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

1 3625

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

6 15542

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 4516

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

1 7015

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 11196

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 12131

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 8000

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 8786

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

CSC,

4 28480

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



Un-Answered Questions { Code Snippets }

how to create a Draggable element

1965


Can you write a program to find the average of numbers in a list in python?

463


How to Link Different Data Sources Together?

1789


What software is available for XML?

362


an on-line examination application using html jsp servlet and jdbc. including session management and cookies

4463






How to block double clicks

1617


how to create Expandable and Collapsible Menus

2648


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

4566


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.

2058


code to positioning of window in certain dimensions

1656


What is data _null_? ,Explain with code when u need to use it in data step programming ?

2809


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

3355


write a program to input a natural number less than and display it in words.test your program on the sample data and some random data sample input= 29 sample output= Twenty nine sample input=17001 sample output= out of range sample input=119 sample output =one hundred and nineteen sample input=500 sample output=five hundred

3449


Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

3182


how to convert between arrays and strings

2102