TweetFollow Us on Twitter

The Road to Code: Pointing the Way

Volume Number: 23 (2007)
Issue Number: 08
Column Tag: The Road to Code

The Road to Code: Pointing the Way

Game on!

by Dave Dribin

Welcome Back

Welcome back to The Road to Code. By now, you should be an expert at using simple variables, functions, and mathematical expressions. Even if you're not, you're probably itching to do something more interesting. Well you're in luck. This month we are going to be building a simple game. First, we'll go over three features of the C language: loops, conditional statements, and pointers. We'll look at them individually, and then we'll combine them to build something more complex.

Can You Repeat that, Please?

Sometimes you want to repeat a section of code multiple times. For example, if we wanted to print the numbers from one to five, we could write a simple C program, like this:

Listing 1: main.c Counting to five

#include <stdio.h>
int main(int argc, const char * argv[])
{
   printf("1\n");
   printf("2\n");
   printf("3\n");
   printf("4\n");
   printf("5\n");
   return 0;
}

As an alternative, instead of hard coding the number inside the string, we could use a variable to hold the current number:

Listing 2: main.c Counting with a variable

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int number;
   
   number = 1;
   printf("%d\n", number);
   number++;
   printf("%d\n", number);
   number++;
   printf("%d\n", number);
   number++;
   printf("%d\n", number);
   number++;
   printf("%d\n", number);
   
   return 0;
}

Given the discussion of variables last month, this code should look familiar. However, I did throw one curve ball. I'm using number++, which is just fancy shorthand for number = number + 1. The benefit of using a variable is that if you needed to change your code to count to ten, you could just copy and paste these two lines of code five more times:

   number++;
   printf("%d\n", number);

Although repeating code like this is more flexible than the hard coded strings in Listing 1, it's not without its drawbacks. Copying and pasting is prone to error. You could accidentally paste those two lines six more times, instead of five. You would now have a bug in your program, as it would print until eleven, instead of ten. Luckily, the C language has a solution to help avoid code repetition, called loops.

While Loops

Repeating the same code multiple times is called looping because after executing a block of code, you want it to loop back around to the beginning, as if the computer was running laps around a track. There are a few of different kinds of loops in C, but the first one we'll be looking at is called a while loop. A while loop repeats the same block of code, while a condition remains valid. Here is how we could rewrite our counting program to use a while loop:

Listing 3: main.c Counting with a while loop

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int number;
   
   number = 1;
   while (number <= 5)
   {
      printf("%d\n", number);
      number = number + 1;
   }
   return 0;
}

All while loops have this same basic structure:

   while (condition)
   {
      body
   }

First, you have the keyword while. Next is the condition, in parenthesis. And finally, the body of the loop, enclosed in braces. The body of a loop is very similar to a body of a function: it's a collection of statements that get executed in order. The body of a while loop is executed over and over, so long as the condition of the while loop remains true. Each time through the loop is called an iteration, thus the while loop iterates over the body.

Conditions

The condition, also called a conditional expression, is similar to the mathematic expressions described last month, except that instead of having the computer perform arithmetic, they are a way to ask the computer simple questions. In this case, the <= symbol is called a less than or equal to operator. Thus the expression "number <= 5" is asking the computer "is the variable 'number' less than or equal to five?" The computer responds to this question with a "Yes" or "No" answer. Because the answer is a simple Yes/No value, it is called a Boolean value. Sometimes the "Yes" and "No" values are called "True" and "False," respectively, which is why a Boolean value is also known as a truth value.

That's enough of the fancy computer science terminology for now. What's important is that a while loop keeps executing its body so long as the condition returns true. And in this case, it keeps executing the body so long as the number variable is less than or equal to five. It is important that our body keeps adding one to number. If it didn't, our while condition would always be true, and it would keep printing the same number over and over, forever. When a loop condition is always true, this special case is called an infinite loop. Infinite loops are usually bugs and can cause the program to stop responding normally. When writing your own loops, double-check your code to ensure you are avoiding an infinite loop. As a side bit of trivia, the street address for Apple's headquarters in Cupertino, California is "1 Infinite Loop". Ah... humor only a geek could love.

Using the while loop, if we want to change the program to count to ten, we just have to change the condition at the top of our while loop to:

   while (number <= 10)

That is much less repetition. No more copying and pasting, and we can now count to 100 or even 1,000 very easily. Counting that high would require a lot more work using Listing 1 or Listing 2 as a starting point. As you gain more experience, I think you will notice that reducing repetition is a key to designing programs with fewer bugs.

To finish off the topic of conditions, I'll provide you with a list of a few common conditional operations. You may use the conditional operators found in Table 1 in a similar manner to how we used <= above.

Table 1: Simple Conditional Operators

Operation   C Syntax   
Equals   ==   
Not Equals   !=   
Less Than   <   
Greater Than   >   
Less Than or Equals   <=   
Greater Than or Equals   >=   

For Loops

Another kind of loop is a for loop. Using a for loop, we can rewrite our counting while loop as:

Listing 4: main.c Counting with a for loop

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int number;
   
   for (number = 1; number <= 5; number++)
   {
      printf("%d\n", number);
   }
   
   return 0;
}

This simplifies our while loop by putting the initial value, the check, and the increment all on one line. All for loops have this same basic structure:

   for (initial expression; condition; loop expression)
   {
      body
   }

The initial expression -- in this case, "number = 1" -- is executed before the loop starts. The body of the loop is executed as long as the condition remains true. Finally, the loop expression is executed at the end of every loop iteration. In fact, any for loop can be rewritten as a while loop:

   initial expression
   while (condition)
   {
      body
      loop expression
   }

Because these are equivalent, you should choose a for loop or a while loop based on what makes your code easiest to read and understand. Oh, one final tidbit: when the body of a loop is only a single statement, you can leave off the braces:

int main(int argc, const char * argv[])
{
   int number;
   
   for (number = 1; number <= 5; number++)
      printf("%d\n", number);
   
   return 0;
}

Be careful, though. If you add a second statement, be sure to add those braces back!

Do While Loops

The final loop construct provided by C is called a do/while loop. This is very similar to a while loop, except the body of the loop is always executed at least once. A do/while loop takes the form of:

   do
   {
      body
   }
   while (condition);

The loop now begins with the do keyword, and the condition is moved to the bottom, after the braces. This ensures that the body is executed at least once, because the condition isn't tested until after one iteration of the body. We will be using this in our game program.

Bugs

I've already used the word "bug" a few times in this article, and I'm sure you've heard it before. But what exactly is a bug? The simplest definition is: an error in the program that causes it to not run as intended. "Run as intended" is a rather vague statement, though. Whose intention are we talking about? Take my first example of a bug where I modified the program that counts to five and changed it to count to ten. If I cut and pasted that code one too many times, and it counted to eleven instead, this could be considered a bug. My intention was to write a program that counts to ten, but it counts to eleven! Of course the intention may depend on your end user. If you were Nigel Tufnel of Spinal Tap, going to eleven would be the correct behavior.

There are many, many reasons why programs have bugs. It all boils down to the fact that software is written by humans, and humans make mistakes. There's no way around it. Programs you write will have bugs too. As your programs get larger, the more bugs you will write. If you're going to keep your sanity while writing programs, you're going to have to come to terms with the existence of bugs.

The process of finding and removing bugs is called debugging. Debugging is a large topic in itself, so I won't be talking about it extensively right now.

Making Decisions

Conditional expressions have another important use. You may want to execute a block of code only if a certain condition is true. For example, let's write a program to print every age from one to thirty and whether or not someone that age may vote in the United States:

Listing 5: main.c Printing voting age

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int age;
   
   for (age = 1; age <= 30; age++)
   {
      if (age < 18)
         printf("You may not vote at age %d\n", age);
      else
         printf("You may vote at age %d\n", age);
   }
   
   return 0;
}

Here we are using a for loop to iterate over all ages between one and thirty. Inside the body of the loop, we are using a new construct called an if statement to check the age. Just like a while loop condition, an if statement contains a condition and a body. The body only gets executed when the condition is true. The else statement contains a block that only gets executed when the condition is false. The else statement is optional. If you don't need it, just leave it off. You may also add another if statement onto an else statement:

   if (age < 18)
      printf("You do not have to pay taxes\n");
   else if (age >= 65)
      printf("You may collect social security\n");
   else
      printf("You must pay taxes\n");

And that wraps up loops and conditional statements. Try writing your own program that combines these concepts. For example, try writing a program that prints whether or not someone with a particular age is eligible to drive where you live.

Pointers

Pointers are one of the most important concepts of C, and they are used quite heavily in Objective-C. They are also considered one of the most difficult concepts in C. We'll take it step by step, and in time, I'm sure you'll be able to grasp pointers, as well.

Last month, I used storage boxes as an analogy for variables. For a quick refresher, a variable is like a storage box in that it holds different types of data, such as integer numbers and floating point numbers. However, that analogy goes further. A computer program will have lots of variables, and sometimes a variable with the same name will be used in different functions. How does the computer keep track? Just like the post office uses numbers to keep track of P.O. boxes, the computer uses numbers to keep track of all the variables. It gives each variable a unique number. In fact, this number is also called an address. [Ed. note: for the system administrators in the audience, you can think of this like DNS. People like names, so, we invent a name like www.apple.com. However, computers like numbers, so, we need a way to get the address for www.apple.com, which nslookup and dig will do. You can translate back and forth between name and address.]

The C compiler hides the details of variable addresses because it's easier for people to remember variable names rather than addresses. The compiler provides a way to get the address of a variable, using the address of operator, which is an ampersand character (&). Here is a small program to print out the address of a variable:

Listing 6: main.c Printing an address

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int number;
   number = 5;
   printf("The contents of number: %d\n", number);
   printf("The address of number: %u\n", &number);
   
   return 0;

}

You should get output similar to this in the Run Log window:

The contents of number: 5
The address of number: 3221223788

Your address may be different, but what's important is that every variable has a unique address. Remember from last time that %d in printf formats an integer, which may be positive or negative. %u tells printf that the number is an unsigned, positive only, integer. [1]

You can also declare a variable that holds an address. Our code above could be rewritten as:

Listing 7: main.c Using a pointer

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int number;
   int * pointer;
   number = 5;
   pointer = &number;
   printf("The contents of number: %d\n", number);
   printf("The address of number: %u\n", pointer);
   printf("The address of pointer: %u\n", &pointer);
   
   return 0;
}

If you run this, again you should get output similar to this:

The contents of number: 5
The address of number: 3221223788
The address of pointer: 3221223784

You'll notice that the pointer variable has an asterisk, or star, in front if it. This changes the type of pointer from an "integer" to a "pointer to an integer", which means it holds an address, instead of an actual integer. There are a couple of interesting points about the output. First, the address of number is still the same. Second, the address of pointer is different. Remember, even though pointer holds an address, it, too, is a variable and gets its own address. Thus our program has two variables, or P.O. boxes, which are summarized in Figure 1. Remember, these addresses may be different on your computer, and are essentially arbitrary.


Figure 1: Variables as boxes

Dereferencing Pointers

That said, you rarely print out an address. Pointers are usually used to modify the contents of another variable. For example:

Listing 8: main.c Dereferencing a pointer

#include <stdio.h> int main(int argc, const char * argv[]) { int number; int * pointer; number = 5; pointer = &number; printf("The contents of number: %d\n", number); *pointer = 10; printf("The contents of number: %d\n", number); return 0; }

This will produce output like:

The contents of number: 5
The contents of number: 10

Whoa! What happened there? The contents of the number variable changed, as if we had written:

   number = 10;

Using the star before pointer tells the compiler that we want to change what is at the address of pointer. Let's examine more closely what happens when we use a line of code like "number = 10". The compiler says, "Hmm... I know the number variable has a box with address 3221223788. Let me change the contents of the box at address 3221223788 to 10."

Putting a star in front of pointer is exactly the same thing. Remember that even though pointer has its own address, the contents of pointer is the same address as number: 3221223788. When the compiler sees "*pointer = 10" it says, "The contents of pointer contains the address 3221223788. Let me change the contents of box at address 3221223788 to 10." Using star before a pointer like this is called dereferencing a pointer. Also the star, when used to dereference a pointer, is called the contents of operator.

You can see, now, how pointers get their name. Pointers point to another variable. In this case, the variable pointer points to the variable number. If you're still confused, think of pointers like file aliases on your desktop. When you create an alias in the Finder, the alias points to the original file. If you open the alias, and make changes to it, the original file gets updated, as well. In the same fashion, pointers allow you to alter the contents of another variable.

Passing Pointers to Functions

Is your head spinning, yet? I hope not. Let's run through another scenario where using pointers are helpful. Let's write a function that triples any number that gets passed into it:

Listing 9: main.c Incorrect triple function

#include <stdio.h>
void triple(int n)
{
   n = n * 3;
}
int main(int argc, const char * argv[])
{
   int number;
   number = 5;
   printf("The contents of number: %d\n", number);
   
   triple(number);
   printf("The contents of number: %d\n", number);
   
   return 0;
}

Even though this code may look correct, it actually has a bug in it. If you run it, you will get this output:

The contents of number: 5
The contents of number: 5

Eh? Why is number still 5, you may be asking? It turns out that arguments of functions are also variables. Thus, the argument n of triple has its own address. Calling the triple function copies the contents of number into the contents of n. When triple changes n, it has no effect on number. We can verify this by printing the variable in triple:

void triple(int n)
{
   n = n * 3;
   printf("n in triple: %d\n", n);
}

This produces the output:

The contents of number: 5
n in triple: 15
The contents of number: 5

Okay, well how do fix this? Pointers to the rescue!

Listing 10: main.c Correct triple function with pointers

#include <stdio.h> void triple(int * pointer) { int n = *pointer; n = n * 3; *pointer = n; } int main(int argc, const char * argv[]) { int number; number = 5; printf("The contents of number: %d\n", number); triple(&number); printf("The contents of number: %d\n", number); return 0; }

This time, you should get the correct output:

The contents of number: 5
The contents of number: 15

So what changed here? First, we are using the address of operator (the ampersand) when calling triple:

   triple(&number);

This passes the address of the number variable to triple, instead of making a copy. Now, we have an argument to triple, named pointer, which is a pointer to an integer. When called, this variable points to the number variable in main allowing triple to change the variable in main. Inside triple, it dereferences the pointer, which sets n to five, initially, by looking inside the box of the number variable. Then it multiplies n by three. Finally, we dereference the pointer, again, to put the result, fifteen, back into the original box. This is really no different than our example in Listing 8, except we've now used a pointer as an argument to a function. It's also worth noting that we can shorten the triple function to:

void triple(int * pointer)
{
   *pointer = (*pointer) * 3;
}

This eliminates the temporary variable n and does the modification on one line. I added extra parenthesis on the right hand side to make sure the star for dereferencing the pointer is not confused with a star used for multiplication.

Communicating with the User

Okay, again that was a bit of a contrived example. So when is this useful in your own program? One case is when you want to get input from the user. Here is a simple program to get the user's age using a standard function called scanf:

Listing 11: main.c Asking the user's age

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int age;
   printf("What is your age? ");
   scanf("%d", &age);
   printf("Your age is: %d\n", age);
   
   return 0;
}

This time, when you run the program, it will stop, waiting for you to type your age into the Run Log window. Type it in, and press Return. Here's what I did:

What is your age? 33
Your age is: 33

The first 33 in bold red is what I typed in. On the next line, you can see it printed my age back to me. What happened here? scanf is a function that reads user input, but it needs to store this result somewhere. By using a pointer, we can pass the address of the age variable, and scanf can store the user's response in age. The %d here is similar to a %d used in printf, and tells scanf to read an integer from the user.

Now that we can communicate with the user, it's getting interesting. Just to spice this up, let's add an if statement that tells you if you are allowed to vote in the United States, similar to what we did in Listing 5:

Listing 12: main.c Can the user vote?

#include <stdio.h>
int main(int argc, const char * argv[])
{
   int age;
   printf("What is your age? ");
   scanf("%d", &age);
   printf("Your age is: %d\n", age);
   if (age >= 18)
      printf("You are allowed (and should!) vote\n");
   else
      printf("Sorry, you are not allowed to vote, yet\n");
   
   return 0;
}

Try running this a couple times, first using an age greater than or equal to eighteen, and again using an age less than eighteen.

Putting it All Together

Lying about your age isn't all that fun, so let's put it all together by writing a simple number guessing game. Here's the code to the entire game:

Listing 13: main.c    Number guessing game
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Generate a random number between 1 and 32
int generate_random_number(void)
{
   // "Seed" the random number generator
   srand(time(NULL));
   int random_number = rand();
   return (random_number % 32) + 1;
}
void play_game(void)
{
   int random_number;
   int guess;
   int count;
   
   random_number = generate_random_number();
   count = 0;
   printf("I am thinking of a number between 1 and 32.\n");
   printf("How quickly can you guess it?\n");
   do
   {
      printf("What is your guess? ");
      scanf("%d", &guess);
      if (guess < random_number)
         printf("You guessed too low. Try again.\n");
      else if (guess > random_number)
         printf("You guessed too high. Try again.\n");
      count++;
         
   } while (guess != random_number);
   printf("You guessed it correctly!\n");
   printf("It only took you %d guesses.\n", count);
}
int main(int argc, const char * argv[])
{
   play_game();
   
   return 0;
}

Hopefully there are not too many surprises here. The only part we have not covered is generating a random number. The rand function is supposed to generate a random number between zero and 2147483647. However, there is one gotcha. If you don't seed the random number generator, it will always return the same sequence of numbers. Since this would not make a very fun game, we are using the current time as a seed. If you don't understand this, don't worry. Just trust me that it's necessary to make this game fun.

Okay, so rand gives us a number between zero and 2147483647, but we really want a number between one and thirty-two. The percent sign is a mathematical operator called the modulo operator that returns the remainder of a division. Think back to grade school math and remember that when dividing a number, you get a quotient and a remainder. For example, if you divide 53 by 10, the quotient is 5 and the remainder is 3. A fancy name for doing division and returning the remainder is called taking the modulo of a number, or just mod for short. The nice thing about the modulo is that its value is always between zero and the divisor minus one. Thus the expression (random_number % 32) always returns a number between zero and thirty-one. Since we want a number between one and thirty-two, we need to add one to it.

Phew! Creating a random number was a little complicated, but given your new knowledge of loops, conditional statements, and pointers, you should be able to understand the rest of the program. The play_game function keeps asking the user for a guess and only stops if the user guesses correctly. It also gives a little hint to the user so she or he can refine their guess. We added two more #include statements, because we are now using other functions that are not declared in stdio.h. rand and srand are declared in stdlib.h, and time is declared in time.h.

Here is a sample session of a game.

I am thinking of a number between 1 and 32.
How quickly can you guess it?
What is your guess? 16
You guessed too low. Try again.
What is your guess? 24
You guessed too high. Try again.
What is your guess? 20
You guessed too low. Try again.
What is your guess? 22
You guessed it correctly!
It only took you 4 guesses.

Play the game yourself a few times, and see how well you can do. With the correct strategy, you should always be able to guess correctly in five guesses or less. Read over the code again, and see if you can follow along as you type. Just to make sure you understand, try adding another do/while loop in main that asks the user if they would like to play again. I'll give you a small hint:

   play_game();
   printf("Enter (1) to play again: ");
   scanf("%d", &response);

See if you can figure out the rest!

Conclusion

We covered a lot of ground this month, from loops and conditional statements to pointers. I know pointers can be a bit tricky. If it's still not clear to you, I suggest writing some code, yourself. Pointers can definitely be difficult to understand by reading alone, so dive in and start playing around. Think about it this way: in just two months, you now know how to write a simple game. That's some good stuff. See what you can do on your own with what we've covered. Programming might take some practice, but it can be fun!

Footnotes

[1]: This is technically incorrect. Pointers should use the %p format string, instead of %u. Unfortunately, %p prints the address in hexadecimal, which is an advanced topic we'll cover later.


Dave Dribin has been writing professional software for over eleven years. After five years programming embedded C in the telecom industry and a brief stint riding the Internet bubble, he decided to venture out on his own. Since 2001, he has been providing independent consulting services, and in 2006, he founded Bit Maki, Inc. Find out more at http://www.bitmaki.com/ and http://www.dribin.org/dave/>.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »

Price Scanner via MacPrices.net

Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more

Jobs Board

Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.