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 36061

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 16855

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

1 9203

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

1 27837

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 32477

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

Value Labs,

1 14237

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 25159

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

6 22329

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 14857

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

HCL, Sokrati, Zoho,

3 44606

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

Wipro,

2 10883

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

TCS,

1 19868

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

1 32342

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

1 28073

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


Un-Answered Questions { Code Snippets }

How to get Dynamically Linked Comboboxes Set?

2198


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+……………...

4588


What is CDATA?

458


write a program to convert temperature from fa height into celcius and vise versa,use modular programming

2682


What is the functionality of GetWindowTextLength?

603


Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.

3626


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

2175


For printing a message we use System.out.println in normal programs. We use String msg="text....."; Can't we use String msg=" " in normal programs and System.out.println("........") in applets. Please answer this question?

2400


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4597


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7385


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

1778


How to use Client-side Script to Focus Controls in ASP.NET?

2592


write a program that can LOCATE and INSERT elements in array using c++ programming languages.

3691


What are nested elements in XML?

439


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

629