Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
algorithms dasgupta solution manual
Hi,
Anybody got solution manual for the book "algorithms by Sanjoy dasgupta, Christos Papadimitriou, Umesh Vazirani"? If you have please post it here.
Thanks
Chappar
Re: int and short int
According to C standard max short size is 2 bytes. Int can be more than that.
Only in machine where int is 2 bytes, both short and ant are same. Other wise they r different.
Re: SOLARIS 10 thread
Core dumb will be generated when your process does some blunder(Seg fault, devide by zero, etc) and terminated by OS.
I don't think for simple thread termination, the core will be generated.
I have following code.
#include<iostream>
using namespace std;
class A{
public:
int x;
A():x(10){}
};
class B{
public:
A* p;
B():p(0){}
B(A* a):p(a){cout<<"Inside B(A* a)"<<endl;}
};
int main(){
B b;
b = new A;
cout << b.p->x << endl;
return 0;
}
when i compiled...
In the below program, i want to know what function f5 is trying to do. What does
return X() mean, since X() is not a object.
class X
{
int i;
public:
X(int ii = 0);
void modify();
};
X::X(int ii)
{
i = ii;
}
void X::modify()
{
i++;
}
X f5()
{
return X();
}
Re: qustion for C expert
Hi Lambtron,
Whatever u have posted, need some modification.
The correct code is as below
char GetLsb( float *f )
{
int a = 5 ;
return ((char *)f)[ (((char*)&a)[0] == 5)) ? 0 : (sizeof(float)-1) ];
}
Re: qustion for C expert
It depends byte ordering in the machine. i.e. the machine is little endian or big endian.
Here is a C code for little endian
float a; // float variable whose low byte is needed
char *ptr, b;
ptr = (char *)&a;
b = ptr[0]; // b contains the low byte of a now.
.. Hope...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.