14

Lets learn bubble sort!
Type the following code to Visual C++ 1998 and compile it. Then run it. Write the output to the paper i just gave it to you.

Reality:
• Takes 5 mins to compile and run
• Too many errors in the given code so obscure output
• Teacher thinks we are so smart that we can understand c by typing and looking at the output.

The worst part:
• Different output per compiler
- Correctly compiles in the compiler in VC++ 98.
- Differs in GNU GCC, compiles wrong
- sends out obscure dummy output in VS2015~2017
- Works well in tutorialspoint.com compiler

WTF is this, guys?

@@@@@@@@@@@@@

Oh, and i have gone off topic...
Why does he think we are smart that we can understand bubble sort, and 4 more by only typing the code and looking at the output without knowing how does this algo work?

@@@@@@@@@@@@@

Answer to weekly question.
The teacher said to understand sorting algos by typing the code and looking at the output which differs per compiler.

Comments
  • 3
    Run away from that teacher. If this continues you'll learn nothing.
  • 1
    @Reboot that algo was the last class. But i have to finish the course... It is important for me

    And yeah i have to make a fucking sudoku with c! WTF is this?
  • 2
    @CozyPlanes

    I believe you are an student.

    While you are studying people will ask what is your score ( an headache in Asia for us). Once you come out of college they won't give a damn about your score, they will ask what is your salary.
    - - one of my class mate told me this.

    He used to skip all classes and get scolded by all staff members. But he is learning by himself by practicing, by doing projects. He was an like an owl during night.

    He used to pass in all course. Doesnt worried about score , only thing mattered to him is knowledge.

    On placement drive, he is the first one to get job offer that too with good salary package.

    So, focus on yourself whether you know it or not.

    Happy coding !!!
  • 2
    We need a pastebin/gist of the code now!!
  • 2
    How can bubble sort vary per compiler? What evil are you doing with it? :O
    And actually it's essential to learn how to visualize code from just reading it.
Add Comment