Code Snippets Interview Questions
Questions Answers Views Company eMail

main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(“%u %u %u %d \n”,a,*a,**a,***a); printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1); }

2 23221

main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }

1 14872

main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }

Persistent,

2 27813

main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }

1 6823

main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }

1 13101

main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 7593

main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i 2 9111


int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }

Cisco, HCL,

3 15661

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

1 15606

What are the files which are automatically opened when a C file is executed?

1 17115

what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 11583

main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 8475

What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 6933

main() { main(); }

1 3850

main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }

1 11464


Un-Answered Questions { Code Snippets }

1+1/2!+1/3!+...+1/n!

2173


What is the functionality of FindWindow?

568


determine which Element received an Event

2093


How do you set a global variable inside a function?

597


what is main difference between array_push and array_pop?

3913


code to get the coordinates of a Click Event

1957


3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.

3528


Write a Program for matrix multiplication.

698


I'm calling a JS fcn that fires AJAX to a webmethod and returns a boolean. How do I retrieve the return value in the codebehind? (VB) I can set a hiddenfield value in the JS, but if it's async how can my VB know when it's changed?

670


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

652


write a program in java to find the moving average of all prime numbers between 2 and 100.

3808


1.Explain what happens to a session object when the browser associated with it is closed? 2.Explain how a session object is created and used. (Note: you are not required to provide the Java statements such as ‘getAttribute’)

2216


how to get the User's Time of Day

1856


Write a python program to count the number of vowels in a string?

653


how to copy form data between different pages

1959