Programming in C : Lesson 7.1

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,278
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 15, 2008

In this lesson we are continuing the the character manipulation C program and do more useful things

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • which is this program?

  • to clarify, c++ returns the value of c before being incremented. ++c returns the value of c after being incremented.

    c = 3; d = c++; // now c is 4 and d is 3.

    c = 3; d = ++c; // now c is 4 and d is also 4.

  • == is a comparison operator. It is used in a conditional test. = is an assignment operator, it sets the value of a variable.

    assignment operations do return values (the value being assigned), and, conditional tests simply test for a non-zero state, so, it is possible to write 'valid' code such as if (x = y) which will set x to y and return true if y is nonzero, as opposed to if (x == y), which will not set any values, but will return true if x and y are equal.

  • never mind i found my problem

  • this program is not working for me

    Is it my compiler maybe, I'm using code blocks 8.02

  • ++ is an addition operator. For example, if you had an integer i, the following commands are equivalent.

    c++

    c = c + 1;

    c += 1;

    There is also the operator ++c. The difference between the two ++ operators is when the computation is done. If you do ++c, it will be done before a comparison, and c++ will be done after.

  • could you explain what ++ does and why you used == instead of =?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more