Code Snippets Interview Questions
Questions Answers Views Company eMail

main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above

HCL,

2 7332

main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above

BrickRed, HCL,

3 11472

void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above

HCL,

2 13758

main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10

HCL,

4 11201

main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\nā€", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above

HCL,

3 6982

main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above

HCL,

2 7019

main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. ā€“3, -1, 1, 3, 5

HCL,

2 9644

main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error

HCL,

1 9674

main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

HCL,

4 15999

main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4

HCL,

2 5682

main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256

HCL,

2 11229

main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

HCL,

3 6690

main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

HCL,

5 11396

main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513

HCL, Logical Computers,

3 7798

why nlogn is the lower limit of any sort algorithm?

2373


Un-Answered Questions { Code Snippets }

write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n

2364


I have this code in leftmenu.ascx page..now on leftmenu.ascx.cs page i want to access id values. but i dont want to check manually like Accommodation,Arts etc.. In cs file my code is like string str[]; //this array contains some values say 10 strings for(i=0;i<100;i++) { if(str[i]==id id.visible=true } i.e.i want to travel for each element of str and each value of id.if they match then id.visible=true how to do?

3816


can any one give me code to keyed a flat file and used chain in RPGLE to search any item

1704


code to detect availability of cookies

1786


How can I include conditional statements in XML?

354






how to create a Custom Scrollbar

2050


How a web page can communicate with a web server while a user type characters in an input field.

1054


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2214


How to Get File Extension?

500


code to get the coordinates of a Click Event

1741


Write a python program to check if a number is a strong number?

443


What is full form of PEPSI

1865


Write a code snippet to display an integer in a binary format?

491


solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)

2930


design a class car having variables model, yr_of_manufacture, owner,reg_no. Design methods for assigning the values, Printing the values( you decide gui,control, any other methods if require)

1832