@ all
This code is error in C as pre-increment operator in C returns rvalue but it
will work fine in C++ as it returns lvalue in C++ which is required as LHS
of assignment operator
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
1)
getchar must be a function in that case . Check /usr/include/stdio.h . It
must have contained an extern definition (it is on my machine).
2)
Machines generally have separate registers for floating point values(let say
%fr). While executing this line *printf(%d\n,t); *that register is loaded
struct t{};
int main(){
struct t a,b,c;
int l;
printf(%u %u %u %u\n,a,b,c,l);
}
o/p
3213845680 3213845680 3213845680 3213845676
a,b,c all are pointing to same location, so no space is allocated to them.
As i already mentioned, *may be* . I dont know what standard says about it
or rather i
@oppilas
In normal inheritance base class is not shared. Each derived class X and Y
have separate instance of base class. The whole point of virtual inheritance
is sharing so that there shall be no ambiguity as there is only one object
of base class.
--
You received this message because you
@ashish
Most probably because empty struct in C have nothing associated with it.
They are as good as nothing. But empty classes in C++ can have member
functions. These functions need to be associated with object, having a
unique address, for that class. And unique address is not possible with
@abc abc
4th class= two ints from X and Y classes + one int from base class( as
this class is shared ) + 2 virtual pointers of X and Y classes.
On Jul 3, 2:24 pm, abc abc may.i.answ...@gmail.com wrote:
In the second case , the size of vptr will be added to each and every object
.
1st class =
How printf can print 2 values for %s and %f if you provided only 1
(3,x1)[*arr] ?
On Jun 24, 12:13 am, Anika Jain anika.jai...@gmail.com wrote:
#includestdio.h
typedef struct
{
char *name;
double salary;}job;
main()
{
static job a={tcs,15000.0};
static job
Absolutely..
Personal comments should be completely banned. And its matter of
shame for people who think that they are serving the nation by
abusing others.
On Jun 13, 5:29 pm, Umer Farooq the.um...@gmail.com wrote:
+1
I really like this group ... but sometimes people get rude and
show
@Akshay
Suffix tree construction is O(n)
On Jun 14, 8:58 pm, Akshay Rastogi akr...@gmail.com wrote:
But generating a suffix tree itself is O(n2) .
On Tue, Jun 14, 2011 at 7:54 PM, sunny agrawal sunny816.i...@gmail.comwrote:
it must be any general string
Suffix tree approach seems
@bittu
How can u find the shortest substring from the tree in 0(n). Can u
please elaborate a bit ?
On Jun 14, 6:03 pm, bittu shashank7andr...@gmail.com wrote:
I found one interesting question
Given a string s , return the shortest substring that is
only occurring once.
Examples:
@all
Stop guessing and making your own standards. C standards haven't
defined anything (though in gcc arguments are processed from left to
right) about processing arguments in a function call. And sentence
like assgnment to a preincrement expression is delayed vry mch
have no meaning .
@nicks
KR says
A warning: printf uses its first argument to decide how many
arguments follow and what their type are. It will get confused and you
will get wrong answer. if there are not enough arguments or if they
are the wrong types.
I think that is the reason for unpredictable output.
On Jun 5,
Right!! that is pretty standard problem but the solution u have given
is for undirected graphs and intuitively binary trees are directed.
Piyush solution will work for binary tree.
On May 30, 2:04 am, anshu mishra anshumishra6...@gmail.com wrote:
this is a very standard problem :D
start with
13 matches
Mail list logo