search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
81 views
asked Geek 15.3k points 16 41 63

1 Answer

0 votes

#include<stdio.h>

#include<conio.h>

void main()

{

char *names[]={“anand”,“murugan”,“selvaraj”, “annammal”,”shrikarthick”, “renukadevi”};

char*tmp;

clrscr();

printf(“original: %s%s”, names[3], names[4]);

tmp=names[3];

names[3]=names[4];

names[4]=temp;

printf(“\n New : %s%s”,names[3],names[4]);

getch();

}

Output:

Original : annammal shrikarthick

New :shrikarthick annammal 

answered Guru 39.1k points 10 21 33

Related questions

0 votes
1 answer 35 views
35 views
difference between a character array and a character pointer.
asked anonymous
0 votes
1 answer 32 views
0 votes
1 answer 24 views
0 votes
1 answer 46 views
0 votes
1 answer 30 views
30 views
asked john Guru 27.1k points 31 50 97
...