Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
306 Programming and Data Structures
OUTPUT:
llll
2 2 2 2
3 3 3 3
Explanation In the above example, addresses of one-array elements are assigned to another array.
The second array assigns addresses to the third one and so on. In the successive printf () statements
increases by one for getting higher level value.
9.9 POINTERS AND STRINGS
9.29 Write a program to read string from keyboard and display it using character pointer.
#Include <stdio.h>
#Include <conio.h>
nainO
{
char name [15] ,*ch;
printf ("Enter Your Name
getsiname);
ch=mame;
J* store base address of string name */
while (*ch !-'\0 ')
I
printf C % c *ch);
ch++;
I
OUTPUT:
Enter Your Name: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343