0% found this document useful (0 votes)
34 views1 page

A Little Bit of C

The document discusses some key concepts in C programming including pointers and printf. Pointers allow accessing and modifying memory locations directly using dereferencing operators like * and &. The difference between i and ii under pointers is that i increments the pointer Ptr after dereferencing it to read the value, while ii increments the value at the address Ptr points to. Printf is used to output values, with %c used to print a single character value.

Uploaded by

keyur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

A Little Bit of C

The document discusses some key concepts in C programming including pointers and printf. Pointers allow accessing and modifying memory locations directly using dereferencing operators like * and &. The difference between i and ii under pointers is that i increments the pointer Ptr after dereferencing it to read the value, while ii increments the value at the address Ptr points to. Printf is used to output values, with %c used to print a single character value.

Uploaded by

keyur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

A Little bit of C

1. C Programming (Teach Yourself C in 21 Days)


a. Pointers
int* Ptr = (int *) 0x80000100;
int Val ;

// Write 0xfeedbead to address 0x80000100:


*Ptr = 0xfeedbead ;
// Read contents of address 0x80000100 into Val:
Val = *Ptr ;
// Initialize Ptr to address of Val (whatever that is):
Ptr = &Val ;

Question: What is the difference between


i. Val=*(Ptr++) ;
ii. Val =(*Ptr)++ ;

b. printf (http://microlabs.cs.utt.ro/~mmarcu/books/04/ch14.htm#Heading14)
i. %c for single character

/conversion/tmp/scratch/420888785.doc
Page 1 of 1

You might also like