Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

main( )

{

char *q;

int j;

for (j=0; j<3; j++) scanf(“%s” ,(q+j));

for (j=0; j<3; j++) printf(“%c” ,*(q+j));

for (j=0; j<3; j++) printf(“%s” ,(q+j));

}

Answer Posted / susie

Answer :

Explanation:

Here we have only one pointer to type char and since we take
input in the same pointer thus we keep writing over in the
same location, each time shifting the pointer value by 1.
Suppose the inputs are MOUSE, TRACK and VIRTUAL. Then for
the first input suppose the pointer starts at location 100
then the input one is stored as

M
O
U
S
E
\0
When the second input is given the pointer is incremented as
j value becomes 1, so the input is filled in memory starting
from 101.

M
T
R
A
C
K
\0
The third input starts filling from the location 102

M
T
V
I
R
T
U
A
L
\0
This is the final value stored .

The first printf prints the values at the position q,
q+1 and q+2 = M T V

The second printf prints three strings starting from
locations q, q+1, q+2

i.e MTVIRTUAL, TVIRTUAL and VIRTUAL.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to palindrom string in c language?

11039


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

2534


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

3348


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

2524


could you please send the program code for multiplying sparse matrix in c????

3569


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

4393


Sir... please give some important coding questions asked by product companies..

2250


why nlogn is the lower limit of any sort algorithm?

2840


Design an implement of the inputs functions for event mode

3505


#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

1622


Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

2467


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2761


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

4512


Write a routine to implement the polymarker function

4886


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2669