Code Snippets Interview Questions
Questions Answers Views Company eMail

void main() { int const * p=5; printf("%d",++(*p)); }

Infosys, Made Easy, State Bank Of India SBI,

3 34608

main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }

DCE,

1 16238

main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 8608

main() { static int var = 5; printf("%d ",var--); if(var) main(); }

1 26987

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 31305

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

Value Labs,

1 13830

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 24507

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

6 20561

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 14380

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

HCL, Sokrati, Zoho,

3 43188

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

Wipro,

2 10298

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

TCS,

1 19282

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

1 31401

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

1 26802

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


Un-Answered Questions { Code Snippets }

How many digit have a Polaris 1995 300c.c. 2x4 nad how many have a Polaris 2007 300 c.c 2x4? And what site I can check this information???

2237


How can I Draw an ellipse in 3d space and color it by using graph3d?

2130


write a code to generate pseudorandom numbes

1786


Code for Adding Scripting Support to an Application?

1374


How can I include conditional statements in XML?

354






Can we have empty XML tags?

373


How to get the version(major,minor,revision ) of VB6.0 delphi code .I am able to fetch dll file of vb6.0 but not vba file .Can u send me the code snippet in delphi to get the value for vb6.0.

3450


Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.

3393


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.

3317


I have multiple datasets and I have to search a particular string in all of them at a single time. Please suggest a full jcl or rexx tool for it.

696


What is the functionality of EnumChildWindows?

470


how to create a Custom Scrollbar

2050


What is an XML Schema?

377


program to bring a window to the front

1568


Code for Communicating over Sockets?

1944