27.04.2021 Views

Yashavant Kanetkar - Let Us C-BPB Publications (2016)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Initializing a Two-Dimensional Array 269

Memory Map of a Two-Dimensional Array 270

Pointers and Two-Dimensional Arrays 271

Pointer to an Array 273

Passing 2-D Array to a Function 274

Array of Pointers 277

Three-Dimensional Array 279

Summary 281

Exercise 281

15. Strings 291

What are Strings 292

More about Strings 293

Pointers and Strings 297

Standard Library String Functions 298

strlen( ) 299

strcpy( ) 301

strcat( ) 304

strcmp( ) 305

Summary 306

Exercise 306

16. Handling Multiple Strings 311

Two-Dimensional Array of Characters 312

Array of Pointers to Strings 314

Limitation of Array of Pointers to Strings 317

Solution 318

Summary 319

Exercise 319

17. Structures 323

Why use Structures? 324

Declaring a Structure 326

Accessing Structure Elements 329

How Structure Elements are Stored? 329

Array of Structures 330

Additional Features of Structures 332

Uses of Structures 341

Summary 341

Exercise 342

xi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!