• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Caleb Curry

Making Money and Investing

  • Home
  • Make Money Online
  • How to Buy Bitcoin
  • Get Started with Real Estate Investing
  • How to Start a Website
  • Courses
    • Full Time Income Online
  • Sponsorship

C Programming Tutorial 42 – Quiz Part 2

October 27, 2018 by Caleb Curry Leave a Comment

Just as a reminder, up next we will be covering logic, conditionals, loops, and how to make more complex programs. But before this, I think it is important to make sure we have the previous blogs down well. These next blogs and previous blog will quiz you on some parts of C. If you have a hard time answering these question, you might want to review your notes. Are you new here? Start at the beginning, Intro to C!

Questions:

1. What is casting?

2. When you cast a double to an integer, is the number rounded or truncated?

3. What is the last character that you have to put in a character array to make a string?

4. What are the two ways to make comments in C and what is the difference?

5. What are primitive data types vs complex data types?

6. What is format character used for integers?

7. What is the format character used to print floating point numbers?

8. What do you need to prefix the format characters with when you are using scanf?

9. When using scanf, what is special about the way you pass in the variable?

10. What is the ASCII code for capital A?

11. What is the difference between ‘A’, and “A”?

Answers:

1. Casting is changing the data type of an expression

2. Truncated

3. We only briefly talked about this one so if you’re not sure, that’s okay

4. /*  */ and //.  The first is a multiline comment

5. Primitive data types are the foundational data types, such as integers. You can combine primitive data types to make more complex data types

6. Either %d or %i

7. %f, %e, and %e

8. You have to use a special operator before your name.  &, the address-of operator

9. 65

10. They’re both constant values, but the first is a character while the second is a single character string

Ready to learn more? Read the next blog on the third part of our quiz!

Filed Under: Uncategorized Tagged With: c programming, quiz 2

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

my face to show my face

My name is Caleb Curry and I started my online business teaching software development and doing digital marketing for brands. Entrepreneurship has changed my life and has allowed me to earn a full time living from anywhere. I now have the freedom and energy to pursue skills and opportunities that I find interesting. This website is all about my journey.

Get my top Python Tips and Tricks

50+ Python Tips and Tricks!

Subscribe to our newsletter to get notes and latest content by email.

    We won't send you spam. Unsubscribe at any time.

    Follow Me!

    • Instagram
    • YouTube

    Recent Posts

    Copyright © 2021 · Genesis Sample on Genesis Framework · WordPress · Log in