Cramster.com - Homework Solutions, Lecture Notes, Exams, and Free Online Homework Help
Sign Up Now! Login Customer Support Cramster Blog
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Problem Solved.
    Home    
    Homework Help    
   Answer Board   
    Resources (Beta)    
   
Member's Topic Headline:

solve it.

Know the answer? Have a better solution? Share it.
Sign Up Now for FREE!
Join the thousands of students
getting ahead in their classes.
Member Testimonials

Question:

Advertisement:

Answer | Ask New Question | Customize Profile | Leaderboards | 
FAQ

Member's Avatar

Rookie
Karma Points: 0
Respect (95%):
Date Posted: 7/24/2008 3:05:05 AM  Status: Live
solve it.
Course Textbook Chapter Problem
N/A N/A N/A N/A
Question Details:

 

Pointers increase the efficiency of our programs of C++ programs due to security
issues s on these comments and justify your answer,

Answers:

Member's Avatar

Expert
Karma Points: 1,027
Date Posted: 7/24/2008 7:47:51 AM  Status: Live
Asker's Rating: Helpful   
Response:
Dear...
 
The context is not specified clearly,i am considering this way to justify. 
Accessing a variable or object through a pointer or reference may be just as fast asaccessing it directly. 
calling a function through a function pointer typically takes a few clock cycles more than calling the function directly. Thus we can say efficiency can be increase .
 
Hope this will help yu

 


Member's Avatar

Expert
Karma Points: 811
Date Posted: 7/24/2008 9:19:43 AM  Status: Live
Asker's Rating: Helpful   
Response:
Dear,

Pointers increase the efficiency of our programs :

Pointers give the memory address(logical) to  programmer  where data is stored. So programmer can directly modify the data so Pointer give more control over where data is stored and how it is initialized. e.g pointers made possible to access hardware directly.
That's make the pointers efficient.
 
Security issue:
Accessing the memory directly make the program insecure. E.g in C/C++ we can access/modify the whole array if we know the base address of array. But it can be dangerous if we cross the limit of array. This will damage other memory locations or will make the core dump. That's make the pointer insecure. But it can be avoided by extra care.
 
 




By reading or posting messages on these forums, you are agreeing to the Answer Board's Terms of Service and Conduct (TSC).


About Cramster | Terms of Use | Privacy Policy | Contact Us | Press Room | Site Map | Support | Anti-Cheating Policy

Cramster.com is not affiliated with any publisher. Book covers, title and author names appear for reference only.
Copyright © 2008 Cramster, Inc.