C program for string address, C/C++ Programming

Assignment Help:

C Program for STRING ADDRESS

#include stdio.h>

#include conio.h>

#include string.h>

void main()

{

          char *name;

          int length;

          char *ch=name;

          clrscr();

          printf("ENTER THE STRING:  ");

          gets(name);

          while(*ch!='\0')

          {

                   printf("%c IS SORTED AT ADDRESS %u\n",*ch,ch);

                   ch++;

          }

          length=ch-name;

          printf("\nLENGTH OF THE STRING IS %d\n",length);

          getch();

}

OUTPUT :

ENTER THE STRING : KAMLESH

K  IS SORTED  AT ADDRESS 928

A  IS SORTED  AT ADDRESS 929

M IS SORTED  AT ADDRESS 930

L  IS SORTED  AT ADDRESS 931

E  IS SORTED  AT ADDRESS 932

S  IS SORTED  AT ADDRESS 933

H  IS SORTED AT ADDRESS 934


Related Discussions:- C program for string address

C++ Program Please see where i do mistake, #include #include #include ...

#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi

Exceptions handling in cpp, Exceptions. Your SVector class should throw fou...

Exceptions. Your SVector class should throw four exceptions: 3.1. If the constructor size is invalid, then it will just allow the implicit STL bad_alloc exception to pass up to mai

Procedure to add two numbers in a recursive manner, (a) Write a procedure c...

(a) Write a procedure called (add x y) that adds two numbers in a recursive manner. Specifically, note that x + y = (x + 1) + (y - 1) and x + 0 = x. (b) Using the substitution m

Pebble merchant, there is a pebble merchant. he sells the pebbles,that are ...

there is a pebble merchant. he sells the pebbles,that are used for shining the floor.his main duty is to take the length of the room side but he sometines mistakes doing that and m

Minimumshelf, Write a program that finds the minimum total number of shelve...

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

Program, First line starts with T, number of test cases. Each test case T c...

First line starts with T, number of test cases. Each test case T contains a necklace (N).

Functions overloading, Functions Overloading This a capability in which...

Functions Overloading This a capability in which a C++ program can have several functions performing similar tasks on different data types. When an overloaded function is calle

Assignment, write a simple c++ program to that use the value to add five nu...

write a simple c++ program to that use the value to add five number .your program should prompt the user to enter these five numbers one after the other

Write a program for simulating jet-powered car acceleration, The absolute l...

The absolute land-speed record of 763.035 MPH (Mach 1.02) was set in October 15 1997 by a jet-powered car called Thrust SSC in the Black Rock Desert of northern Nevada. The team th

Write a program to calculate the average of ten numbers, Write a program to...

Write a program to calculate the average of ten numbers       #include stdio.h     /* Only this header is needed since only IO are used */     void main()     {          char

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd