Programming Code Interview Questions
Questions Answers Views Company eMail

main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }

1 31268

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

Value Labs,

1 13825

main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 24500

main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

6 20537

main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 14378

main() { printf("%x",-1<<4); }

HCL, Sokrati, Zoho,

3 43171

main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

Wipro,

2 10287

main() { int c=- -2; printf("c=%d",c); }

TCS,

1 19271

#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 31362

main() { int i=10; i=!i>14; Printf ("i=%d",i); }

1 26769

#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 4015

#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 4797

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

Hexaware,

3 14263

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

1 4902

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

3 30627


Un-Answered Questions { Programming Code }

How to Check if File Exists?

516


1.What happens to a session object when the browser associated with it is closed? 2. Explain what happens when a servlet is sent a POST request? 3. Why does only one copy of a servlet get created? 4. Explain what happens when a browser requests a servlet? (for the first time) 5.How is information stored in a session object?

2042


What is GUID anyway?

573


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

4571


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

3138






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

3065


i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

1963


How to create Date method to set the date in Ms Access

1848


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??

4140


What is full form of PEPSI

1858


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

2088


In LSMW , what does the following error mean and how to rectify it : Incorrect interface data for set 78 in method C . This error is occuring in idoc processing step of LSMW.

2127


Code for Document Validation in XML.NET?

1982


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

3359


c# code to Count number of 1's in a given range of integer (0 to n)

4297