manish soni


{ City } jaipur
< Country > india
* Profession * student
User No # 66360
Total Questions Posted # 0
Total Answers Posted # 33

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 170
Users Marked my Answers as Wrong # 75
Questions / { manish soni }
Questions Answers Category Views Company eMail




Answers / { manish soni }

Question { TCS, 17704 }

Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);

No. of times the loop is executed ?


Answer

IT SHOW ACTUAL O/P.
main()
{
int c;
int i=1;
for ( c=0;c!=256;c+=2)
{
printf("%d=%d\n",i,c);
i++;
}
getch();
}

MANISH SONI
[GYAN CORPORATION,CHANDIGARH]

Is This Answer Correct ?    1 Yes 0 No

Question { TCS, 14288 }

identify the in correct expression
a.a=b=3=4;
b.a=b=c=d=0;
float a=int b=3.5;
d.int a;
float b;
a=b=3.5;


Answer

identify the in correct expression
a.a=b=3=4;
b.a=b=c=d=0;
float a=int b=3.5;
d.int a;
float b;
a=b=3.5;

in first st 4 is not assigned in the 3 so lvalue required.
second is correct.
third is incorrect
third is alsoincorrect
manish soni cgc chandigarh...

Is This Answer Correct ?    4 Yes 1 No


Question { TATA, 77068 }

distinguish between physical addresses and logical address?


Answer

what is ravi a joshi ....
In short, CPU receives virtual address[mean logical address]
from OS, converts it
to logical address to address the physical address


to check and the send this answer again.

Is This Answer Correct ?    7 Yes 4 No

Question { HPL, 15815 }

compute the nth mumber in the fibonacci sequence?


Answer

#include
#include
void main()
{
int a,b,sum,n,cnt;
printf("Enter the number");
scanf("%d",&n);
for(a=0,b=1,cnt=1;cnt<=n;cnt++)
{
sum=a+b;
printf("%d\t",sum);

a=b;
b=sum;
}
getch();

}

Is This Answer Correct ?    1 Yes 0 No

Question { 52034 }

c++ program to add 2 complex number using operator
overloading technique


Answer

manish soni tagore collage jaipur
ph:9785261817
e_mail:monupanhar@yahoo.comf;
hapy to help;

#include
#include
#include
using namespace std;
struct complex
{
int real;
int img;
};

void getdata(complex &);
complex sum(complex,complex);
complex mult(complex,complex);
void display(complex);

int main()
{
complex c1,c2,c3,c4;
getdata(c1);
getdata(c2);
c3=sum(c1,c2);
cout<<"Sum= ";
display(c3);
c4=mult(c1,c2);
cout<<"MULT= ";
display(c4);
getch();
return 0;
}
complex sum(complex c1,complex c2)
{
complex c;
c.real=c1.real+c2.real;
c.img=c1.img+c2.img;
return c;
}
void display(complex c)
{
cout<

}
complex mult(complex c1,complex c2)
{
complex c;
c.real=c1.real*c2.real-c1.img*c2.img;
c.img=c1.img*c2.real+c1.real*c2.img;
return c;
}
void getdata(complex &c)
{
cout<<"Enter first complex number:"< cout<<"Enter real ";
cin>>c.real;
cout<<"Enter img ";
cin>>c.img;
}

Is This Answer Correct ?    44 Yes 22 No

Question { Wipro, 3472 }

DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?


Answer

main deference in c and cpp is



-------------------|-------------------|
c | c++ |
-------------------|-------------------|
top down approach | bottom up approach|
-------------------|-------------------|

Is This Answer Correct ?    1 Yes 0 No

Question { 4914 }

what is the size of an integer variable?


Answer

size of integer is
sizeof(int);

Is This Answer Correct ?    0 Yes 0 No

Question { 7290 }

write a C program, given number is double without using addt
ion and multiplication operator?ex:n=6,ans=12,pls send me ans
to goviseenu@gmail.com


Answer

#include
#include
void main()
{
int a;
printf("Enter number which you want to
double");
scanf("%d",&a);
printf("THE NUMBER IS %d AND DOUBLE NO IS %
d.",a,a<<1);
getch();//optional to write getch();
}

Is This Answer Correct ?    0 Yes 1 No

Question { Infosys, 21298 }

write a c program to print "Welcome" without using semicolon
in the whole program ??


Answer

while(printf("welcome"))
{
}


it produce the infinite loop
so plz delete this logic.
or edit it with me

#include
#include
void main()
{
while(printf("hello"))
getch();
}

Is This Answer Correct ?    5 Yes 6 No

Question { Xavient, 9442 }

write a program for 7*8 = 56 ? without using * multiply
operator ? output = 56


Answer

#include
#include
void main()
{
int i,ans;
ans=0;
for(i=0;i<8;i++)
ans=ans+7;
printf("%d",ans);
getch();
}

Is This Answer Correct ?    5 Yes 1 No

Question { Wipro, 13901 }

What is period operator in c?


Answer

period operator is a main operator bcoz it is used to
access the strutre member .
s.n1
s.n2
....like that.

Is This Answer Correct ?    18 Yes 4 No

Question { 5381 }

what is the difference between unix os and linux os


Answer

1.unxi is command base o.s it mean unix is CUI(character
user interface)but the linux is GUI base operting system.

2.unix is firstly writen with (which language come before
c).after invented of the c.unix in writen in(95% part) c
language. or we can say that c language actually developed
for impliment the unix operting system.

3.linux is unix base o.s. or linux is improvement of unix
o.s.

4.linux lorwards is owner or developer of linux o.s.

Is This Answer Correct ?    0 Yes 0 No

Question { HCL, 6853 }

what is ANSI and ISO


Answer

ANSI-american national standard institution.
defined the standard about computer and its language.


ISO=International standard organization
is group of 163 country which definced stdard of each
producd.
daily life u seen "this product is verifed by ISO".

Is This Answer Correct ?    2 Yes 1 No

Question { Sasken, 23183 }

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


Answer

m=i++&&j++&&k++||n++;
in this expression
first
m=0++&&...........
from rule of && opr c1&&c2
if c1 is 0(FLASE) it don't chacke the next expression
so
m=0---------------(1);

after this
m=i++&&j++&&k++||n++;
-----------------------
m=i++&&j++&&k++ is flase so only i is increase by and j and
k not effect.
-------------------------------
after that
in ||(OR )OPR
C1||C2
IF C1 IS 0(FALSE) THEN IT CHECK THE C2
m=i++&&j++&&k++(C1)||n++(C2);
THEN C1 IS 0 and c2 is 0++ is 1 so true.
so answer is
1,same,same,0,i,

Is This Answer Correct ?    4 Yes 4 No

 [1]   2   3    Next