Amazon.com Widgets Trouble with Exercise 3
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 02, 2014, 01:24:00 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Chapter Study
| | |-+ Chapter 4 - Data Types and Expressions
| | | |-+ Trouble with Exercise 3
Pages: [1] Go Down
Print
Author Topic: Trouble with Exercise 3 (Read 681 times)
rimmonhouse
Newbie
*
Posts: 15






on: May 10, 2011, 10:36:50 AM

I don't understand the program in Exercise 3.  Why is the letter d enclosed in a pair of single quotations, while c is not?  I'm not sure what lesson the program is supposed to illustrate.  Thanks in advance!
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







Reply #1 on: May 10, 2011, 12:28:12 PM

The program is supposed help you understand how to define a char constant, a char variable, and how to assign the former to the latter.   The character in single quote is a char value.  It is assigned to the variable c with a statement like this:

Code: (Objective-C)
c = 'd';

Cheers,

Steve
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.