LogicDcoder's Posts
Nairaland Forum › LogicDcoder's Profile › LogicDcoder's Posts
Beauty with brain! Congrats |
angelEmade:hmmm |
Bro for my own side ooo... computer science na d branch of engineering science dat studies (with the aid of computers) computable processes n structures(in CS you learn the art of solving problems with existing algorithms, developing algorithms using programming languages and others. U will make use of discrete math, data structures, existing algorithms etc. in solving problems) while software engineering is a branch of CS dat deals with the development of software and testing of the software.(In SE you will learn all d software design processes, a lil bit algorithm n DS and a lot of tools used by developers. ). Just see CS as industrial chemistry and SE as chemical engineering! |
Hmmm I laf in bahose!
|
A versatile engineer! |
valzey:you have a point thanks |
Just look at the second image. Line 47. lemme simplify the code for ya. struct node *new_node = NULL;//Here i created a pointer which is actually pointing to nothing. new_node = malloc(sizeof(node));//Here the pointer is now pointing to an actual object of type node here. You saying that malloc initializes an object to zero is something foreign. My question is when to use malloc() and calloc? Should I use calloc() only when allocating storage for arrays or other contigous data structures? |
valzey:I don't really understand what you mearnt by malloc initializing to zero. I don't really know where you get this. Malloc function is used to allocate storage dynamically for objects. In what I understood malloc() allocates storage uncontigously(malloc returns a pointer to void(generic pointer) which is pointing to a memory block) while calloc() allocates memory contigously. You aforementioned using malloc() when all the blocks are allocated (which blocks?). |
I normally use calloc() (since it allocates memory contiguously which is suitable for arrays) when I want to allocate space/storage for arrays and malloc() when I want to allocate memory space for structures (creating a node for linked list,queues,binary trees etc). Looking at the implementation of stacks-> Using arrays: each element on the stack is linked with the previous element contiguously. Using linked list each node(each node is a self referential structure) containing the element are only linked using pointers. Does it mean that for I to use calloc(), the DS I'm working with must be contiguous in nature. What happens in the memory when I use calloc() to allocate storage for linked list,queue,tree and other ADTs node. C++ programmers can also contribute! Image 1 & 2 -> Implementation of stacks using arrays. Image 3&4 -> Implementation of stacks using linked list. Don't mind my English lalasticlala !�
|
Sanchez01:Make i catch u dia. na messi come tell u naaa. All I know is that messi has a foresight , he has seen this defeat already. He wants changes but the board members where so corrupt. |
Barca meee! He told u guys to make some changes on time but ppl where shouting that he is controllin barca board members. He really wants the best for barca |
Cancel all call diverts |
cc: chief lalasticlala honeric01 semid4lyfe |
Lionel Messi was once the quiet kid in the corner of the dressing room who barely made eye contact with team-mates. Now it seems he calls the shots at Barcelona. As another coach falls and the club's president Josep Bartomeu continues to wobble as elections for the club's most powerful position are brought forward to next March, Sportsmail asks: just how politically powerful is the Barca captain? https://i.dailymail.co.uk/1s/2020/08/17/12/32043494-8635149-image-m-2_1597663109809.jpg From timid teenager to boss at Barca... he runs the club doesn't he? No. And many Barcelona supporters will tell you if he did run the club it wouldn't be in the mess it's in. If Messi really called the shots to the extent that some believe he does then Neymar would never have left, or at least would have been re-signed by now and Antoine Griezmann would probably never have arrived. Ernesto Valverde would not have been sacked in January and replaced by Quique Setien. The list goes on. https://i.dailymail.co.uk/1s/2020/08/17/12/32043604-8635149-image-a-3_1597663283835.jpg https://i.dailymail.co.uk/1s/2020/08/17/12/32043616-8635149-image-m-5_1597663361670.jpg But he has huge influence and he is not afraid to wield it... Yes that's fair. But this is nothing new. Remember Wayne Rooney handing a transfer request in at Manchester United in 2010 and issuing a statement about the club's failure to match his ambitions and compete in the transfer market? Messi is playing the same game, only now the statements are more likely to be made on Instagram or occasionally through journalist allies. Why don't the club buy the players he wants? He asked the club to try to re-sign Neymar last summer. There were a couple of very public flights into Paris that ended, surprise surprise, with PSG telling Eric Abidal: no you can't have Neymar. It wasn't very subtle, it didn't appear to be done with much conviction, and it seemed to be a gesture to Messi: look we're doing our best! https://i.dailymail.co.uk/1s/2020/08/17/13/32045036-8635149-image-m-25_1597666183594.jpg Messi wanted to be reunited with Neymar this season but the club were rebuffed by PSG https://i.dailymail.co.uk/1s/2020/08/17/12/32043772-8635149-image-a-8_1597663752051.jpg Instead they signed Antoine Griezmann with the Frenchman often not gelling with Messi https://i.dailymail.co.uk/1s/2020/08/17/12/32043940-8635149-image-a-9_1597663873844.jpg Neymar is on course for a historic quadruple with PSG in the Champions League semi-finals So he doesn't pick the signings. Does he pick the team? No, but he knows what he likes and the coach knew what he likes. New boss Ronaldo Koeman will know too. Arturo Vidal never really fitted the Quique Setien idea of what a Barcelona midfielder should be but Messi valued him and so more often than not - including in the starting line-up against Bayern - Vidal played at Griezmann's expense. https://i.dailymail.co.uk/1s/2020/08/17/12/32043986-8635149-image-a-11_1597664010387.jpg Arturo Vidal (right) started for Barca against Bayern - with Messi valuing the Chilean highly Has Messi made life hard for Griezmann? No, not hard. The two met up in Ibiza when the players went on their mini-holidays after the league season finished and the Champions League restarted. They get along. But it's no secret that Messi would have preferred the club re-sign Neymar than sign Griezmann. He has also taken 17-year-old Ansu Fati under his wing. And when training restarted after lockdown but players could only work together in small groups it was notable that Fati and Luis Suarez were in Messi's training group and Griezmann wasn't. https://i.dailymail.co.uk/1s/2020/08/17/12/32044042-8635149-image-m-13_1597664100359.jpg Despite their obvious qualities, the Griezmann-Messi experiment is yet to have delivered https://i.dailymail.co.uk/1s/2020/08/17/12/32044062-8635149-image-a-14_1597664174988.jpg In contrast, the 33-year-old has taken teenager Ansu Fati under his wing at the Spanish giants Is all this healthy? What's healthy for Barcelona is that Messi is happy and playing at his best. These are not power plays for the sake of it; he wants to win. He wants to retire with the biggest trophy haul possible. He only has three Champions Leagues (he doesn't count the win over Arsenal in Paris when he was in the stands) and as far as he is concerned that is not good enough. And his likes and dislikes are often just logical. It didn't make a lot of sense for Barcelona to sign Zlatan Ibrahimovic in 2009. Messi had just made the false nine position his own. And if he was going to be playing centrally where was Zlatan going to play, on the wing? No chance. Messi knows what works and what doesn't. When he ceases to be the player who gets Barcelona out of trouble then he will no longer be able to justify having his say but right now he is still their saviour. They were only in Lisbon because he turned on the style against Napoli to put them through. And what does he want now? He wants real change at the club and that can only mean a new president. His relationship with Joan Laporta was always excellent and Laporta may well stand in the next election. Another candidate Victor Font seems to have Xavi in the bag as his coach and possibly Carles Puyol lined-up as Sporting Director - that would also be a massive improvement on the current situation. https://i.dailymail.co.uk/1s/2020/08/17/12/32044102-8635149-image-a-15_1597664276916.jpg Josep Bartomeu (left) and Eric Abidal (right) are under scrutiny as is the entire Barca board https://i.dailymail.co.uk/1s/2020/08/17/12/32044132-8635149-image-a-16_1597664343780.jpg Ex-Barca president Juan Laporta (left) has always enjoyed an excellent relationship with Messi Is that why he's not denied the story that he is ready to leave the club this summer? If the fear over him leaving was the factor that forced next year's early elections then it was a masterstroke. Maybe in every bluff there's also small percentage of 'I'll really do this if I have to'. But for now it looks strategic. He believes he can win more before he retires. For all their problems there is still probably more chance of him doing that at Barcelona than elsewhere. But a lot has to change and at 33 he can't really wait around too long for it to happen. https://i.dailymail.co.uk/1s/2020/08/17/12/32044144-8635149-image-a-17_1597664441002.jpg Despite an abject season, Messi knows his best chance of winning trophies remains with Barca source: https://www.dailymail.co.uk/sport/football/article-8635149/PETE-JENSON-Lionel-Messi-does-NOT-call-shots-Barcelona-fans-wish-did.html |
When you win U have Friends but lose they all turn up as fiends! Neymar is a good player whether arrogant or not. |
backbone503:Who told you that they built the team around him... nawa for we nairalanders, we dey talk as if we dey the barca executive seff!!! Messi is just a player and a captain and he doesn't call all the shots. |
FuckThaMod:I don hear sir. |
FuckThaMod:One thing in life is there's no loss with a lil bit of dignity... A loss is a loss. |
No matter how huge your are, you can't win it all. Even though messi suffered a huge defeat yesterday that doesn't make him a failure forever. He's still the my GOAT!. |
SegFault:Yah. After learning C, learning other PL will be a piece of cake. |
timmy110:I will advice you to learn C|C++ | Java as your first language but I strongly recommend C++ because it has all the features of C and also an OOP. It’s also the best PL for competitve programming which will help you tackle technical interview questions. |
SegFault:Wow C language is actually my first PL |
SegFault:why c# |
Over to you the professionals!
|
SegFault:Noted boss! but i really love using typedef because it makes me type less. If using for or while loop is better, could you write a function that concatenates two linked lists? |
tensazangetsu20:Alright thanks |
The code below is an implementation of Linked List using C language. I converted a string of characters to a Linked List. So I need you guys to give me a better alternative here(Check each routine/function and make your changes).
|