Posts

The Machine Language

Image
All most everyone knows, the computational program that we use to write using various languages like C, C++, Java, Python etc. is just for our understanding. Whereas the machine understands some other language called the machine language. So the question is how does and who transforms our source code (human-written computational programming instructions) to the machine language. Well, there is a various level of transformation. And it turns out there are different players for handling in this game them. So I'm here giving a demonstration of C programming language for your understanding. Program: Hello World So now you have completed your job of writing the Hello World program. Now, what's the next phase? The next phase is 'Include' as you have mentioned to include stdio.h which is a header file sitting in your header libraries folder location. See, here it is. So the next question is who will include these data from the header file to your main pr...

Network Packet Processing Simulation

I am doing a certification course on Coursera. And two days before I came across this question. Question:  Implement network packet processing simulation. Programming Language: I have written using C. You can prefer whichever you are comfortable with. Description: You'll have a buffer memory and a list of instruction. Arrival time and processing time will be provided for each instruction. You have a processor which can process a single instruction at a time. So you have to find out the process start time for each instruction. Note: If you are interested and would like to solve this question, mail me here (debasishiter@gmail.com). I will forward you the complete question. It's not challenging or difficult but it's interesting. You might come up with a simpler solution compare to mine. Spoiler Alert!!! Find my solution below. /***************************************************** Implementation of newtork processing simulation Coursera : Dat...

Last Evening : Simon Games

Image
Last evening I was looking for few more students in Sauder building. And guess what!!! I met a guy who asked me if I could look at his code. Me: Which programming language? Guy: C programming language Me (Great!!! I don't know any other programming language): Sure. But I may leave soon. Guy: Thanks. It's completely fine. I will do it by myself then. Me: No, It's okay. I will look at it anyway. (I love to show off and pretending) Then  I looked at the code. But did not understand anything out of that. So decided to leave finally. Back in my room, I thought about the code again. The guy was writing a code on Simon Games. I didn't have any clue about that game. So I just checked what that game is about. Here it's if you don't know about it.             This game is interesting. Isn't it? I mean easy to understand and a good to play and waste my time. Anyway, I thought I'll try to implement this using C. I don't know about GUI ...