Question
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
Question Submitted By :: Guest
I also faced this Question!!
Rank
Answer Posted By
Re: 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
Answer
# 1
d) L does't make any diff.
Guest
Other C Code Interview Questions
Question Asked @ Answers main()
{
unsigned int i=65000;
while(i++!=0);
printf("%d",i);
} 1 void main()
{
int i=10, j=2;
int *ip= &i, *jp = &j;
int k = *ip/*jp;
printf(“%d”,k);
} 1 Find the largest number in a binary tree Infosys 4 program to find the roots of a quadratic equation HP 3 Given an array of size N in which every number is between 1
and N, determine if there are any duplicates in it. You are
allowed to destroy the array if you like. Microsoft 15 How do I write a program to print proper subset of given
string . Eg :input: abc
output:{},{a},{b},{c},{a,b},{a,c},{b,c},
{a,b,c}.I desperately need this program please mail me to
saravana6m@gmail.com Deshaw 9 What is the hidden bug with the following statement?
assert(val++ != 0); 1 const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}
a. 0
b. 2
c. 4
d. none of the above HCL 1 void main()
{
int i=5;
printf("%d",i+++++i);
} 1 why java is platform independent? Wipro 10 print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Tata-Elxsi 19 Program to find the largest sum of contiguous integers in
the array. O(n) 7 #include<stdio.h>
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 main()
{
char not;
not=!2;
printf("%d",not);
} 1 how can u draw a rectangle in C Wipro 31 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 1 How we print the table of 3 using for loop in c
programing? 3 main()
{
printf("%d", out);
}
int out=100; 1 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 How do you sort a Linked List (singly connected) in O(n)
please mail to pawan.10k@gmail.com if u can find an
anser...i m desperate to knw... Oracle 3 For more C Code Interview Questions Click Here