answersLogoWhite

0

Using one pointer don't we print two variables?

Updated: 8/17/2019
User Avatar

Wiki User

15y ago

Best Answer

You can print two variables with one printf, with or without pointers:

int val1= 10, val2=20, *pval2= &val2;

printf ("val1=%d, val2=%d\n", val1, *pval2);

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Using one pointer don't we print two variables?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is stray pointer?

stray pointer is a that pointer which pin points nothing or anywhere but we dont know... for example: int *ptr; ptr=new int[10]; //this memory is on heap. and at the end of the programm if we dont delete this memory mean to say if we dont deallocate this memory then this type of pointer is pointing towards nothing or anywhere because when we work on heap deletion of pointer is must if we dont delete pointers than they pin point stray or anywhere so that sort of pointer is stray pointer. i think you understand...


Where can you buy a bey pointer in Canada?

i dont think you can!!


My wireless printer doens't recognize my iPod. How do you print from an iPod?

You can only print from your iPod if you have the AirPrint app and you are using an AirPrint-enabled printer. So far the only Air-Print enabled printers are made by HP.


How many books in print on Lincoln?

dont no


What is a foam print making?

dont have a clue


How do you print on pixton?

I dont know how to i WANTED the answer


How do you print off chaotic cards?

You Dont. It's illegal.


How do you print last pay-stub from Applebees?

i dont know


What does bussinessman use when making their speeches but pastors dont use during their sermons?

pointer note card charts powerpoints


What do you do if you don't take a pic of the fake Bigfoot print on Cryptids?

well its easy if you dont get the pic you dont defeat the island


What are some separation variables with the molecules in electrophoresis?

hi. i dont know the question. ok bye.


How do you print a picture from Facebook?

dont tell people on fantage bad words