Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,153,043 members, 7,818,091 topics. Date: Sunday, 05 May 2024 at 07:32 AM |
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: 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: 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: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: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: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: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: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: 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: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: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: 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: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 |
Re: The Greatest Programmer On Nairaland by seunthomas: 12:26am On Feb 27, 2016 |
airsaylongcon: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: Provide it lets see |
Re: The Greatest Programmer On Nairaland by seunthomas: 12:31am On Feb 27, 2016 |
airsaylongcon: 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: Is this all? |
Re: The Greatest Programmer On Nairaland by Nobody: 12:42am On Feb 27, 2016 |
airsaylongcon:I wonder. . . |
Re: The Greatest Programmer On Nairaland by seunthomas: 12:45am On Feb 27, 2016 |
airsaylongcon: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: 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: 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:You don humble sha. LOL. Warehouse manager. |
Re: The Greatest Programmer On Nairaland by airsaylongcon: 12:55am On Feb 27, 2016 |
seunthomas: I'm shivering |
Re: The Greatest Programmer On Nairaland by seunthomas: 12:57am On Feb 27, 2016 |
airsaylongcon: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 |