By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,359 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

Questions

P: 12
I looked at the websides you guys gave me still could not find the answers!!!

1. How do you pass an array to a function? example?
2. how do i declare a floating point?
3. What is inderection when talking about pointers?
4. Given the following piece of code, what does cout show?
int*p, i = 15;
p = &I;
*p = 20;
cout<< i ;
5. can a particular array contain integers, floats, and characters?
6. What is the value of 2*3 + 7%2-15?
Mar 22 '07 #1
Share this Question
Share on Google+
3 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
I looked at the websides you guys gave me still could not find the answers!!!

1. How do you pass an array to a function? example?
2. how do i declare a floating point?
3. What is inderection when talking about pointers?
4. Given the following piece of code, what does cout show?
int*p, i = 15;
p = &I;
*p = 20;
cout<< i ;
5. can a particular array contain integers, floats, and characters?
6. What is the value of 2*3 + 7%2-15?
Those are some pretty basic questions, if we've posted and you're still having trouble, you should go talk to your teacher.
Mar 22 '07 #2

P: 84
I looked at the websides you guys gave me still could not find the answers!!!

1. How do you pass an array to a function? example?
2. how do i declare a floating point?
3. What is inderection when talking about pointers?
4. Given the following piece of code, what does cout show?
int*p, i = 15;
p = &I;
*p = 20;
cout<< i ;
5. can a particular array contain integers, floats, and characters?
6. What is the value of 2*3 + 7%2-15?

Those are basic questions, look at these answers:
1- You have a function: int myfunction(int Array[10])
then you write the name of an array as a parameter.
2- Don't understand, floating numbers?? float mynumber;
4- cout shows 15!!!!!!!!
5- yeah, sure. Only one at a time, but you could define an integer array and your compiler could also "interpret" the numbers and show them as characters, like 65='A'
6- By using % you get a result as you would using fmod().
2*3 + 7%2 - 15
6 + 1 - 15
6+1+15=22
Easy, isn't it??
Mar 23 '07 #3

P: 84
Those are basic questions, look at these answers:
1- You have a function: int myfunction(int Array[10])
then you write the name of an array as a parameter.
2- Don't understand, floating numbers?? float mynumber;
4- cout shows 15!!!!!!!!
5- yeah, sure. Only one at a time, but you could define an integer array and your compiler could also "interpret" the numbers and show them as characters, like 65='A'
6- By using % you get a result as you would using fmod().
2*3 + 7%2 - 15
6 + 1 - 15
6+1+15=22
Easy, isn't it??
i mistook it should have been:
6+1-15=-8
:(
Mar 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.