Learning C++: Challenges to Test Your Skills

  • C/C++
  • Thread starter bassplayer142
  • Start date
  • Tags
    Skills Test
In summary: But, I know there are many ways to solve it and this is just one way. I don't know what you mean by "translatations of problems from common language to the ˝language˝ of simple Bayes formula for a conditional probability can be troublesome sometimes." In summary, the TV host shows you three numbered doors (all three equally likely), one hiding a car and the other two hiding goats. You get to pick a door, winning whatever is behind it. Regardless of the door you choose, the host, who knows where the car is, then opens one of the other two doors to reveal a goat, and invites you to switch your choice if you so
  • #1
bassplayer142
432
0
I am learning c++ at what I would consider a fast rate. Having took Qbasic years ago everything came into place pretty quick but I'm slowing down in the functions part. I am picking it up though. I know variables, calculations, arrays, logic, and loops.

What I am looking for is a website with a bunch of good problems to test my skill and get me going. Reading it and making crappy examples from my head doesn't do justice to good hard problems.

thanks.
 
Technology news on Phys.org
  • #2
have you worked with classes?
 
  • #3
I'm going off of the C++ for dummies book and also some stuff of the internet if i can find it. This book shows classes on chapter 21 while I'm on chapter 6-7.
 
  • #4
okie dokie, that can wait. Have you studied pointers?
 
  • #5
That would be chapter 8 which is next. If you have any stuff with pointers in it just post them. I'm sure in 2-3 days I will have arrays and functions down and be able to move on.

Thanks
 
  • #6
http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
 
  • #8
Have you heard of the http://www.cs.uwaterloo.ca/~alopez-o/math-faq/mathtext/node32.html" ?

"A TV host shows you three numbered doors (all three equally likely), one hiding a car and the other two hiding goats. You get to pick a door, winning whatever is behind it. Regardless of the door you choose, the host, who knows where the car is, then opens one of the other two doors to reveal a goat, and invites you to switch your choice if you so wish. Does switching increases your chances of winning the car?"


If you want a little project, you could write a simulation.
 
Last edited by a moderator:
  • #9
You could also take a look at this site from my school:
http://www.math.ucla.edu/~wittman/10a.1.07w

There are homework assignments with solutions and practice exams there.

(I think this guy really, really likes Lord of the Rings!):-p
 
Last edited by a moderator:
  • #10
Math Is Hard said:
Have you heard of the http://www.cs.uwaterloo.ca/~alopez-o/math-faq/mathtext/node32.html" ?

"A TV host shows you three numbered doors (all three equally likely), one hiding a car and the other two hiding goats. You get to pick a door, winning whatever is behind it. Regardless of the door you choose, the host, who knows where the car is, then opens one of the other two doors to reveal a goat, and invites you to switch your choice if you so wish. Does switching increases your chances of winning the car?"

If you want a little project, you could write a simulation.

I have no idea what can OP learn from writting the program in c++ for these sorts of a problemS (perhaps nothing except playing with words is far from being conditional probability) but here is the equivalent problem considering a coin tossing I saw recently:
_______________________________________________________________________________
A box contains two coins.
One coin is heads on both sides and the other is heads on one side and tails on the other.One coin is selected from the box at random and the face of one side is observed.If the face is heads what is the probability that the other side is also heads?

_______________________________________________________________________________

To OP:Learning the syntax is the last thing good programmer should be concerned with.Most of the things what you can do in Basic,Fortran or Pascal you can do also in c.Depending on type of the problem you are dealing with ,written code may be just longer or shorter[*].IMO,dynamic programming side is the most important thing by far.

EDIT:
Example for [*]:http://math.scu.edu/~dsmolars/ma61/notesrev.html
And if you want some good problems that aren't trivial just say.I can invent them for you :smile:
 
Last edited by a moderator:
  • #11
tehno said:
I have no idea what can OP learn from writting the program in c++ for these sorts of a problemS (perhaps nothing except playing with words is far from being conditional probability)

It's just a little project that could be done without things the OP has not studied yet. I think it would be fun (but hey, that's just me). Variations of the Monty Hall problem are sometimes discussed at PF: https://www.physicsforums.com/showthread.php?t=138952
 
  • #12
Math Is Hard said:
It's just a little project that could be done without things the OP has not studied yet. I think it would be fun (but hey, that's just me).
He mentioned Qbasic and I assumed he wasn't a complete newby to programming .I wanted to stress some general principles of programming are more important than realization of code by concrete syntax of a language.That's my experience.IMHO,c++ is great for starters ,but I prefer UCSD Pascal and Turbo Pascal for mathematically loaded problems (it's not just matter of taste).
Math Is Hard said:
I think it would be fun (but hey, that's just me).
What r u talking about? I estimate you a smart blonde Hardy.:smile:
Thank you for the link.Didn't know that was discussed on PF before.
It illustrates how translatations of problems from common language to the ˝language˝ of simple Bayes formula for a conditional probability can be troublesome sometimes.
I gave the the tossing coins variant which in theory of probability represents, most likely, one of the most classical and widely studyed setups ,but still can confuse people. :biggrin:
And when one gives example with goats,doors and cars , people just get completely lost :wink:

EDIT: Not a notewothy comment but maybe a concidence :
http://free-zg.htnet.hr/jsribar/en/
This the best book I've seen about c++ ,among many foreign books...
Unfortunately ,I only have the Croatian version.
 
Last edited:
  • #13
tehno said:
What r u talking about? I estimate you a smart blonde Hardy.:smile:
Thank you:smile: I'm grateful to have the brilliant ones like you to look up to for advice. Keep on doing what you do, and helping us newbies to C++ out.
 
Last edited:

Related to Learning C++: Challenges to Test Your Skills

1. What is C++ and why is it important to learn?

C++ is a high-level, general-purpose programming language that was developed in the early 1980s by Bjarne Stroustrup. It is an extension of the C programming language and is widely used in various industries such as software development, game development, and even in operating systems. Learning C++ is important as it allows you to have a deeper understanding of how computers work and gives you the ability to create efficient and complex programs.

2. What are the challenges in learning C++?

Some of the challenges in learning C++ include understanding the syntax and structure of the language, mastering the concepts of pointers and memory management, and grasping the object-oriented programming principles. Additionally, debugging and troubleshooting can also be challenging as C++ is a low-level language and does not have built-in error handling mechanisms.

3. What are some resources for practicing C++ skills?

There are various resources available for practicing C++ skills, including online tutorials, coding challenges, and coding websites such as Codecademy, HackerRank, and LeetCode. Reading books and solving exercises from C++ textbooks can also be helpful in improving your skills.

4. How can I test my C++ skills?

One way to test your C++ skills is by attempting coding challenges and exercises that require you to apply different concepts and techniques of the language. You can also create your own projects and try to solve real-world problems using C++. Another option is to take online quizzes or tests that assess your knowledge and understanding of C++.

5. What are the benefits of completing challenges in learning C++?

Completing challenges in learning C++ can help you to improve your problem-solving skills, enhance your understanding of the language, and build a strong foundation for more advanced programming concepts. It can also give you a sense of accomplishment and boost your confidence in your programming abilities.

Similar threads

  • Programming and Computer Science
Replies
8
Views
906
  • Programming and Computer Science
Replies
6
Views
1K
Replies
9
Views
1K
Replies
1
Views
59
  • Introductory Physics Homework Help
Replies
5
Views
397
  • STEM Academic Advising
Replies
14
Views
1K
Replies
37
Views
2K
  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
21
Views
5K
  • General Discussion
Replies
23
Views
2K
Back
Top