It's great to see this group active after such a long time, though it was
not for discussing an algo, but I think it's fine if a member in the group
needs some help in his/her professional career and asks for the same here.
Many members in this group are in this industry from more than a decade or
Please block this guy.
On Thu, Sep 10, 2015 at 1:08 AM, Shaik Asif
wrote:
> Hi Partner,
>
>
>
> This is Shaik from Deegit Inc. Please find the below requirement for your
> review. If you are comfortable with the requirement please get back to me
> ASAP on
http://stackoverflow.com/questions/3127454/how-do-c-class-members-get-initialized-if-i-dont-do-it-explicitly
On Sun, Sep 28, 2014 at 12:22 PM, Deepak Garg deepakgarg...@gmail.com
wrote:
Hi
In example 1, member z will have a garbage value (i.e. 0 in your case )
Thanks
Deepak
On Sep 28,
detects the loop in singly linked list.
On Thu, Dec 1, 2011 at 1:42 PM, Vijay Khandar vijaykhand...@gmail.comwrote:
What does the following program do on the singly linked list?
p=head;
q=head-next;
while(p!=null q!null)
{
if(p==q)
{
exit(0)
}
p=p-next;
yes, it will work.
On Sun, Nov 20, 2011 at 9:12 PM, Akash Coder akash.coder.g...@gmail.comwrote:
no it wont work ... const is not a datatype. its a qualifier
On Sun, Nov 20, 2011 at 7:49 PM, rahul sharma rahul23111...@gmail.comwrote:
void fun(char *)
void fun(const char *)
is this
u have a new line in 2nd prog bt not in the st, that makes the difference.
when u do fork in 1st code, the algo is nt printed on the terminal,
rather it is in the stdout buffer oly, which gets duplicated in the forked
pr also. nd wen the prog terminates, whtver is ther in the buffer gets
printed
in the end if '\n' is not received.
thanks rahul :)
On Fri, Nov 11, 2011 at 12:31 PM, rahul vatsa vatsa.ra...@gmail.comwrote:
u have a new line in 2nd prog bt not in the st, that makes the difference.
when u do fork in 1st code, the algo is nt printed on the terminal,
rather it is in the stdout
:
oh, so what you want to say is that when '\n' is not there in print
command and then it is stored in stdout buffer unless it receives a '\n'
and executes only in the end if '\n' is not received.
thanks rahul :)
On Fri, Nov 11, 2011 at 12:31 PM, rahul vatsa vatsa.ra...@gmail.comwrote:
u have
shallow copy
-
class MyString {
char *str;
public:
MyString(char *);
//MyString operator=(const MyString t);
};
MyString :: MyString(char *)
{
}
MyString a(rahul);
MyString b;
b = a;
the default = operator does a bitwise copy, so if we don't overload the
default behaviour,
ignore the prev mail, send button hd got clicked while i was typing .. :P
shallow copy
-
class MyString {
char *str;
public:
MyString(char *);
//MyString operator=(const MyString t);
};
MyString :: MyString(char *s)
{
int len = strlen(s);
str = new char[len
child contains full code, bt it will start execution of the next line after
the fork.
return value of fork is 0 for the child, bt pid of the child in the parent
process.
On Sun, Oct 2, 2011 at 3:50 AM, rahul sharma rahul23111...@gmail.comwrote:
plz tell me hw does fork wokrs???child contain
pr.
is it clear ..
On Sun, Oct 2, 2011 at 5:01 AM, rahul sharma rahul23111...@gmail.comwrote:
pid=0 for child
then getpid in child???gives child process id???plz xplain
On Sun, Oct 2, 2011 at 1:32 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
child contains full code, bt it will start
@sukran, it seems u ve by mistake written deep copy in place of shallow
copy vice versa.
On Sat, Oct 1, 2011 at 8:31 AM, sukran dhawan sukrandha...@gmail.comwrote:
deep copy-value copy
so for pointers oly address is copied nt the value
so its like two variables pointing to same value
c style string is just the char array which is null terminated.
On Fri, Sep 30, 2011 at 1:27 AM, rahul sharma rahul23111...@gmail.comwrote:
what is c style string??n wats diff b/w c and c++ strings
representtaion..
--
You received this message because you are subscribed to the
@Don +1
main(int argc, char **argv) -- no of cmnd ln args is argc 1st one is
implicitly the binary name, so the max cmnd ln args will be 2^31 - 1
On Fri, Sep 23, 2011 at 11:58 AM, Don dondod...@gmail.com wrote:
2^31-1
On Sep 23, 8:55 am, amrit harry dabbcomput...@gmail.com wrote:
solve it.
time is a keyword in c/cpp, change time to any other string in ur code nd it
will work.
On Thu, Sep 22, 2011 at 12:27 PM, Rajesh Kumar testalgori...@gmail.comwrote:
not working by changes provide by you
On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:
if i pass an int array to a function, is it possible to find out the no of
elements in the called function ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from
45 times
On Wed, Sep 14, 2011 at 3:35 AM, sharmila saru sharmi99p...@gmail.comwrote:
hello will be printed 9 times
On Sun, Sep 11, 2011 at 3:25 AM, htross htb...@gmail.com wrote:
main()
{
int tmp;
for(i=0;i9;i++)
{
tmp=fork();
9,8,7,6,5,4,3,2,1 hello by the 9 child prs
On Wed, Sep 14, 2011 at 4:07 AM, htross htb...@gmail.com wrote:
how is it 45
On Sep 14, 12:56 pm, rahul vatsa vatsa.ra...@gmail.com wrote:
45 times
On Wed, Sep 14, 2011 at 3:35 AM, sharmila saru sharmi99p...@gmail.com
wrote
ther is no get() function.
On Wed, Sep 14, 2011 at 1:55 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
I think there is no problem with the while statement, even if file is
not present , it will create a new file...
The problem is with f.get()but dunno what...?
On 9/14/11, sandeep
i tried ur code it gives the same output as wen u execute the command on
terminal.
On Wed, Sep 14, 2011 at 3:03 PM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
if i write on terminal echo {a,b,c}{a,b,c}{a,b,c} then i get the output all
possible combination of a,b,c and if i write like
http://gplus.to/amolsharma99
http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99
On Thu, Sep 15, 2011 at 1:13 AM, rahul vatsa vatsa.ra...@gmail.comwrote:
i tried ur code it gives the same output as wen u execute the
command
@Anshul +1
s,t r just pointers variables, and until u don't assign it addr of some
object, where will it keep the values for str elements which r being
assigned in the code.
On Mon, Sep 12, 2011 at 3:38 AM, Sanjay Rajpal srn...@gmail.com wrote:
Run-Time error for Segmentation Fault.
Sanju
index we create for a column on a table, nd when we create that, internally
the indexes, which r key,field values with that column value probably the
corresponding record addr, r created and stored in some tree structure.
and wen we do a select based on this column value, db 1st searches this
i think it should be 1.
5/2 paintings r made by 5/2 ppl in 5/2 days using 5/2 canvas
= 1 painting is made by 1 person in 1 day using 1 canvas
i.e. 1 guy cn make a painting in 1 day using a canvas.
Now, the other case, to make 25 paintings using 25 canvases in 25 days.
As there r 25 days total
to the number of people and the number of days. Thus,
paintings = constant * people * days.
We can use the given data to solve for the constant: 5/2 = c * 5/2 *
5/2, so c = 2/5.
Finally, 25 = 2/5 * people * 25, so people = 5/2.
Dave
On Sep 7, 7:30 am, rahul vatsa vatsa.ra...@gmail.com wrote
don u r rt :-)
On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote:
Figure out the man days per painting:5/2 artists working for 5/2 days is
25/4 man days.
They produce 5/2 paintings, so that is 5/2 man days per painting.
Thus to make 25 paintings will require 25*5/2 man days.
ya dave u r also correct :-)
On Wed, Sep 7, 2011 at 10:21 AM, Dave dave_and_da...@juno.com wrote:
@Rahul: Wasn't I correct, too?
Dave
On Sep 7, 9:07 am, rahul vatsa vatsa.ra...@gmail.com wrote:
don u r rt :-)
On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote
19 prs will be created, total 20 prs.
we have discussed this a few days back. plz check the old thread for any
explanation.
On Wed, Sep 7, 2011 at 12:01 PM, Mohit Goel mohitgoel291...@gmail.comwrote:
a. 15
b. 19
c. 21
d. 27
e. 31
these are the only options.
--
You received
processes. 2(Ln 1) * 5(ln 2) * 2
(ln 3) == 20 prs
On Wed, Sep 7, 2011 at 12:12 PM, vivek goel vivek.thapar2...@gmail.comwrote:
can anyone explain me how?? plsss
On Wed, Sep 7, 2011 at 9:40 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
19 prs will be created, total 20
ishant is rt, nowher in the qstn its mentioned dat oly standing legs hs to
be counted. so 84/(2+4) = 14 pair of elements mahouts.
On Wed, Sep 7, 2011 at 12:27 PM, Mani Bharathi manibharat...@gmail.comwrote:
which one is right?
--
You received this message because you are subscribed to the
ans of 2 should be (b)
On Wed, Sep 7, 2011 at 2:29 PM, Rashmi Jain rashmi.jain...@gmail.comwrote:
4. a)
On Wed, Sep 7, 2011 at 11:56 PM, Rashmi Jain rashmi.jain...@gmail.comwrote:
1. a)
2. c)
3. b)
cnt get the 4th one
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi
there is no restriction at all, you can create n no of objects. A member
function can call a private constructor any number of times.
Just 1 single object is created bcoz this is the property of singleton
class.
A singleton class is a class which ensures the class has only one instance
it
:D
may be u lost this to gt something better :-)
On Tue, Sep 6, 2011 at 4:32 AM, ROHIT SINGHAL rohitksingha...@gmail.comwrote:
due to this singleton class i lost 6.5 lpa opportunity :( in Hcentive noida
On Tue, Sep 6, 2011 at 12:58 PM, rahul vatsa vatsa.ra...@gmail.comwrote
sizeof(void) - 1
void is a datatype, though u cant create obj of void type, then also it hs
to hs a size, so it hs been given the minimal sz i.e 1.
On Tue, Sep 6, 2011 at 3:13 PM, Kunal Patil kp101...@gmail.com wrote:
@siddharam suresh: sizeof(void) is an prohibited operation. So your
bcoz void is a datatype, though u cant create obj of void type, then also it
hs to hs a size, so it hs been given the minimal sz i.e 1
On Tue, Sep 6, 2011 at 5:11 PM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
why sizeof(vod) is giving ans 1 not error?
--
*UTKARSH SRIVASTAV
CSE-3
when 1st fork (in ln2) is nonzero.
On Wed, Aug 31, 2011 at 2:41 PM, htross htb...@gmail.com wrote:
u r not considering what if the first fork returns non zero and the
second for returns a zero value then
On Aug 31, 9:50 pm, rahul vatsa vatsa.ra...@gmail.com wrote:
int main
@sid, ya in case of loop head2-next won't ever be NULL, bt this function
has to check if is there a loop. so u need to take care of condition wen
ther is no loop in the list. so 4 that this condition is required.
On Wed, Aug 31, 2011 at 11:17 PM, Siddhartha Banerjee
thefourrup...@gmail.com
ya thats rt.
On Thu, Sep 1, 2011 at 4:30 AM, Sanjay Rajpal srn...@gmail.com wrote:
@Rahul : I have also mentioned that for the linker error.
You can place a definition int var; after main(), it will work.
Sanju
:)
On Wed, Aug 31, 2011 at 11:14 AM, rahul vatsa vatsa.ra...@gmail.comwrote
u mean, u want to write a class for mysql ?
a simple class u cn write which will ve member functions, OpenConnection,
fireTheQuery, Close ... depending on ur requirements ...
On Fri, Sep 2, 2011 at 12:52 AM, Maximilian Anthony
maximilian@gmail.com wrote:
make some databas in mysql;
main is getting called recursively, for each call 1 stack frame will be
created. the lowest stack will have the value i = 9, and top frame will have
the value i=1.
so, when i is 1 in the last call of main, when it goes to while(--i0) st,
i becomes 0, nd so it willn't go further in the function.
sizeof(d) is the sz of pointer, so depending on arch it will be 4 or 8 ...
On Wed, Aug 31, 2011 at 11:57 AM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
its 4 3 i think
On Wed, Aug 31, 2011 at 9:25 PM, aditi garg aditi.garg.6...@gmail.comwrote:
8 3
On Wed, Aug 31, 2011 at 9:22 PM,
int main()
{
fork();
fork() fork() || fork();
fork();
printf(forked\n);
return 0;
}
ln 1 : will create 2 prs
ln 2 : will create 10 process for each existing pr
ln 3 : will do fork for all 10 process, nd so now u ve 20 prs
the main issue is @ln-2 in main( )
Ln 2 :
here for 1st
@rahul,
instead of
head2=head2-next-next;
u cn put -- head2= (head2 - next) ? (head2-next-next) : head2 - next;
this will take care of situation wen head2-next is null.
On Wed, Aug 31, 2011 at 1:02 PM, sukran dhawan sukrandha...@gmail.comwrote:
use hair and tortoise rule to find loop
@sanju, if u declare a variable with extern, at compile time its defn is nt
looked for, rather @ link time corresponding defn is looked for by the
linker. nd if the defn is nt ther, it will raise a linker error, as in case
of this prog
@rahul, ya off course, for a variable to be global it hs to
(A) i = 20; i++;
(B) for (i = 0; i20; i++) { }
(C) a = i++;
(D) while (i++ = 20) cout i;
Ans: A
Why ???
wen u change i++ to ++i, C, D will get effected.
C - i++ increments i, bt it returns the original value. where as ++i will
increment i nd will return the incremented value.
so, a = i++ - 20
@nidhi, if u change the i++ to ++i in D, it will compile, bt off course it
will keep on printing 20 in an infinite loop.
i just tried it, nd it compiles.
invalid lvalue in assignment will be when it is i++.
On Tue, Aug 30, 2011 at 1:06 PM, nidhi jain nidhi.jain311...@gmail.comwrote:
c++ provides a few default member functions for your class if you don't
declare them urself, this includes copy constructor assignment(=)
operator.
In your program,
emp e={xyz,21}; // the default copy constructor is invoked
e2=e; // here the default assignment operator is invoked
On Sun, Aug
wen u pass an array as parameter to a func, it does decay to a pointer, nd
compiler doesn't stop u to change contents of the array through this
pointer.
basically u can change or not the value at some memory location depends on
how u have allocated it not how u r accessing it.
On Sun, Aug 28,
49 matches
Mail list logo