For char *str = "Hello", pointer "str" will point to a location where constant string "Hello" is stored.

For int *i = 10, i is an integer pointer pointing to memory location 10. Applications in Windows/Linux runs in protected mode making the location inaccessible from any application. Thus writing some value to this memory location (*i = some value) will cause a core dump or application crash.

You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.

 Vote 0

Similar topics related to this section

print using fprintf, take input using fscanf, floating point formatting, pointers, string vs integer pointer, long pointer increment, short pointer increment, short pointer increment, memory model, near, far and huge pointer,

# C Programming Language (Prentice Hall Software)
# Let Us C Paperback - 2006 by Yashavant Kanetkar
# Understanding and Using C Pointers Core techniques for memory management
# Data Structures Using C and C++ Paperback - 1998
# Data Structures In C Paperback - August 11, 2008 by Noel Kalicharan