Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,043 members, 7,818,091 topics. Date: Sunday, 05 May 2024 at 07:32 AM

The Greatest Programmer On Nairaland - Programming (26) - Nairaland

Nairaland Forum / Science/Technology / Programming / The Greatest Programmer On Nairaland (65314 Views)

The Most Popular Programmer On Nairaland 2016 Edition (verification Round) / Seunthomas - The Greatest Programmer On Nairaland / The most popular programmer on Nairaland 2016 Edition (2) (3) (4)

(1) (2) (3) ... (23) (24) (25) (26) (27) (28) (29) ... (39) (Reply) (Go Down)

Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:16am On Feb 27, 2016
seunthomas:

Relax na. Since the guy did not even create a proper struct if i answer how can he mark it?? Can a teacher mark question that he does not know the answer?

Let me retype that struct for you as you seem to have a problem that I collapsed it into one line

Struct t {
int i;
int m;
Struct t *b;
Struct t *d;
}
Re: The Greatest Programmer On Nairaland by Nobody: 12:17am On Feb 27, 2016
seunthomas:

Relax na. Since the guy did not even create a proper struct if i answer how can he mark it?? Can a teacher mark question that he does not know the answer?

Wait self, when did the Internet reach Naija self? or the first PC?
Father, share your experience..
Re: The Greatest Programmer On Nairaland by Nobody: 12:17am On Feb 27, 2016
FincoApps:


This 1998 stuff ehn... you guys dhtml and airsaylongcon are not serious at all grin grin grin grin grin grin
See now, he cannot even remember how to declare a struct anymore, that section of his memory has been overwritten. . .due to old age in programming.

1 Like

Re: The Greatest Programmer On Nairaland by seunthomas: 12:18am On Feb 27, 2016
dhtml18:

Yes it is, at least according to my knowlege of C, but you may not believe it, so check the link below:
https://en.wikipedia.org/wiki/Struct_(C_programming_language)
bro, one of the things that makes a good programmer is that we open our eyes and see code not look and make assumptions.
Struct declaration cant be like so
struct t (int i,m; struct t *b, *d)
So @airsaylongcon does not know what he is typing.
And if he does not know what he is typing how can i be sure he knows the correct answer and not here to waste my time.
Re: The Greatest Programmer On Nairaland by Nobody: 12:18am On Feb 27, 2016
airsaylongcon:


Let me retype that struct for you as you seem to have a problem that I collapsed it into one line

Struct t {
int i;
int m;
Struct t *b;
Struct t *d;
}
How can you be teaching a professor of programming how to write a struct? This is most embarrassing. . .

1 Like

Re: The Greatest Programmer On Nairaland by seunthomas: 12:18am On Feb 27, 2016
dhtml18:

See now, he cannot even remember how to declare a struct anymore, that section of his memory has been overwritten. . .due to old age in programming.
Look closely oga
struct t (int i,m; struct t *b, *d)
no curly bracket but normal bracket
Re: The Greatest Programmer On Nairaland by Nobody: 12:19am On Feb 27, 2016
seunthomas:

bro, one of the things that makes a good programmer is that we open our eyes and see code not look and make assumptions.
Struct declaration cant be like so
struct t (int i,m; struct t *b, *d)
So @airsaylongcon does not know what he is typing.
And if he does not know what he is typing how can i be sure he knows the correct answer and not here to waste my time.
Oya continue the challenge jor, I am not going to off my generator until you finish it - and i know you may flunk it again.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:20am On Feb 27, 2016
DanielTheGeek:


Bro you are good. Shikena, please keep quiet!
Let the real purpose of the thread be fulfilled.

I am a rookie o. A mere warehouse rat. So please don't say I am good.

As for the thread and it's purpose. Dhtml18 has killed the op so many times on this thread without a clap back from the OP. The op feels he can take on a rookie like me. Let him try
Re: The Greatest Programmer On Nairaland by Nobody: 12:20am On Feb 27, 2016
seunthomas:

Look closely oga
struct t (int i,m; struct t *b, *d)
no curly bracket but normal bracket
I no dey look, na your challenge, oya finish am jor. Make i go watch movie small, i shall be back to see the result.
Re: The Greatest Programmer On Nairaland by seunthomas: 12:20am On Feb 27, 2016
Seriously bro am disappointed you can descend low like this ohh

airsaylongcon:


Why you dey run mouth? How many hours e take you to ask me your own?. I will modify this post with the question so look out

*modified*
A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null. A C program is written to count how many nodes are accessible from any of the nodes in th data structure. The code use an "indicator" field (initialized to zero for all nodes). Correct the following code so that it works properly as it will not work in its current state

struct t (int i,m; struct t*b, *d)
int count(struct t*a)
{
If (a->m) return 0;
return count(a->b) + count(a->d)+1;
}




Am not saying i wont solve it but you asked a question and you dont even know the answer so how do i know if am correct or wrong?
Just common sense...
Re: The Greatest Programmer On Nairaland by seunthomas: 12:22am On Feb 27, 2016
Thats why the first question i asked is can you solve it?
Re: The Greatest Programmer On Nairaland by seunthomas: 12:23am On Feb 27, 2016
I will solve it ohh, with proper explanation self and well documented steps.
Re: The Greatest Programmer On Nairaland by seunthomas: 12:23am On Feb 27, 2016
Just admit that you flunked the question and did not even set it correctly...
Re: The Greatest Programmer On Nairaland by Nobody: 12:23am On Feb 27, 2016
*Laughing uncontrollably* seunthomas is really sweating this one out. . . .he seems to have run into a stackoverflow error (or rather its C equivalent since this is not JAVA lang).
Re: The Greatest Programmer On Nairaland by Nobody: 12:24am On Feb 27, 2016
seunthomas:
Just admit that you flunked the question and did not even set it correctly...
Wait a minute, did he flunk the question or you flunked the answer. . . .

1 Like

Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:24am On Feb 27, 2016
seunthomas:
Seriously bro am disappointed you can descend low like this ohh

airsaylongcon:


Why you dey run mouth? How many hours e take you to ask me your own?. I will modify this post with the question so look out

*modified*
A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null. A C program is written to count how many nodes are accessible from any of the nodes in th data structure. The code use an "indicator" field (initialized to zero for all nodes). Correct the following code so that it works properly as it will not work in its current state

struct t (int i,m; struct t*b, *d)
int count(struct t*a)
{
If (a->m) return 0;
return count(a->b) + count(a->d)+1;
}




Am not saying i wont solve it but you asked a question and you dont even know the answer so how do i know if am correct or wrong?
Just common sense...

Descend low how? What was it that I said that implied I descended low. I challenged you for a question at 6:57am and that question did not come until 10:08pm in the evening. Is that descending low?
Re: The Greatest Programmer On Nairaland by seunthomas: 12:25am On Feb 27, 2016
dhtml18:
*Laughing uncontrollably* seunthomas is really sweating this one out. . . .he seems to have run into a stackoverflow error (or rather its C equivalent since this is not JAVA lang).
Na bro, am quite calm and cool. Just laying emphasis on someone's blunder.
Re: The Greatest Programmer On Nairaland by Nobody: 12:26am On Feb 27, 2016
Do While flunk = true
Debug.Write("This is getting rather funny"wink
Loop
Re: The Greatest Programmer On Nairaland by seunthomas: 12:26am On Feb 27, 2016
airsaylongcon:


Descend low how? What was it that I said that implied I descended low. I challenged you for a question at 6:57am and that question did not come until some time in the evening. Is that descending low?
You quickly corrected your mistake na(boju boju as yoruba would say-cover up). Admit you set a wrong question and you get the answer but you may need to contact a c programmer to be sure. What i provide will actually run when compiled.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:30am On Feb 27, 2016
seunthomas:

You quickly corrected your mistake na(boju boju as yoruba would say-cover up). Admit you set a wrong question and you get the answer but you may need to contact a c programmer to be sure. What i provide will actually run when compiled.

Provide it lets see
Re: The Greatest Programmer On Nairaland by seunthomas: 12:31am On Feb 27, 2016
airsaylongcon:


Provide it lets see

Yes boss.
Re: The Greatest Programmer On Nairaland by seunthomas: 12:33am On Feb 27, 2016
A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null.
struct t {
int i;
int m;
struct t *b, *d;
};

Assumption 1:
t->b is not null
t->d is not null

A data structure is basically a kind of container to store data
This problem is actually a tree(cant remember which type specifically)....
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:41am On Feb 27, 2016
seunthomas:
A data structure is "built" using nodes. Each node has exactly two pointers that point to other nodes. None of the pointers is null.
struct t {
int i;
int m;
struct t *b, *d;
};

Assumption 1:
t->b is not null
t->d is not null

A data structure is basically a kind of container to store data
This problem is actually a tree(cant remember which type specifically)....

Is this all?
Re: The Greatest Programmer On Nairaland by Nobody: 12:42am On Feb 27, 2016
airsaylongcon:


Is this all?
I wonder. . .
Re: The Greatest Programmer On Nairaland by seunthomas: 12:45am On Feb 27, 2016
airsaylongcon:


Is this all?
You have so many mistakes in the code am correcting and checking with compiler.
int count(struct t*a)
{
If (a->m) return 0; //WRONG If should be if
return count(a->b) + count(a->d)+1;
}
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:48am On Feb 27, 2016
seunthomas:

You have so many mistakes in the code am correcting and checking with compiler.
int count(struct t*a)
{
If (a->m) return 0; //WRONG If should be if
return count(a->b) + count(a->d)+1;
}

Imagine the things you are nit picking. And you are test running on a compiler? Do you want me to retype the entire question again?
Re: The Greatest Programmer On Nairaland by seunthomas: 12:49am On Feb 27, 2016
typedef struct t {
int i;
int m;
struct t *b, *d;
}data;
int count(data *a)
{
if (a->m){
return 0;
}

return count(a->b) + count(a->d)+1;

}


No need am calling it a night. I need to look at it closely, right now i just fixed your typos. This runs but i have bus 10 error.
C is a killer no garbage collection etc.

I dont want to crash my machine
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:52am On Feb 27, 2016
seunthomas:
typedef struct t {
int i;
int m;
struct t *b, *d;
}data;
int count(data *a)
{
if (a->m){
return 0;
}

return count(a->b) + count(a->d)+1;

}


No need am calling it a night. I need to look at it closely, right now i just fixed your typos. This runs but i have bus 10 error.
C is a killer no garbage collection etc.

I dont want to crash my machine

Take your time. I'm not in a rush. Just mention me when you are done
Re: The Greatest Programmer On Nairaland by seunthomas: 12:53am On Feb 27, 2016
@airsaylongcon
The good thing about this challenge is am cracking my brain. lol

See you in the morning when my power is back. You will be in real trouble then
Re: The Greatest Programmer On Nairaland by seunthomas: 12:54am On Feb 27, 2016
airsaylongcon:


Take your time. I'm not in a rush. Just mention me when you are done
You don humble sha. LOL.
Warehouse manager.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:55am On Feb 27, 2016
seunthomas:
@airsaylongcon
The good thing about this challenge is am cracking my brain. lol

See you in the morning when my power is back. You will be in real trouble then

I'm shivering
Re: The Greatest Programmer On Nairaland by seunthomas: 12:57am On Feb 27, 2016
airsaylongcon:


I'm shivering
You should. Considering what @dhtml did and you supported(trying to find out about me), i could really do some damage to you guys ohhh. I hope it does not get to mention of my past employee.

(1) (2) (3) ... (23) (24) (25) (26) (27) (28) (29) ... (39) (Reply)

Funny Programming Memes. Just For Laughs / How To Hack Your Girlfriend's Whatsapp And Fb Account / Atm Hacks "beware"

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 42
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.