UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why are pointers used in C/C++?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

Tutor

Pointers are used in C/C++ for several important reasons: 1. Direct Memory Access: Pointers allow direct manipulation of memory addresses, providing fine control over memory and efficient resource management. 2. Dynamic Memory Allocation: Pointers enable dynamic memory allocation with functions...
read more
Pointers are used in C/C++ for several important reasons: 1. Direct Memory Access: Pointers allow direct manipulation of memory addresses, providing fine control over memory and efficient resource management. 2. Dynamic Memory Allocation: Pointers enable dynamic memory allocation with functions like malloc, calloc, new, and delete, allowing programs to use memory more flexibly. 3. Efficient Array and String Handling: Pointers can be used to navigate arrays and strings efficiently, facilitating operations like iteration and manipulation without copying data. 4. Function Arguments: Pointers allow passing large data structures (like arrays or structs) to functions without copying, improving performance and efficiency. 5. Data Structures: Pointers are essential for implementing complex data structures such as linked lists, trees, and graphs, where nodes can reference other nodes. 6. Polymorphism and Inheritance: In C++, pointers (and references) are used to achieve polymorphism through base class pointers pointing to derived class objects. 7. Low-Level Programming: Pointers are critical in system-level programming, enabling direct interaction with hardware and memory management. Overall, pointers enhance flexibility, efficiency, and performance in C and C++ programming. read less
Comments

"Transforming your struggles into success"

Pointers in C/C++ are used to directly access and manipulate memory, facilitate dynamic memory allocation, enable efficient array and string handling, and allow functions to modify variables from calling contexts through reference.
Comments

My teaching experience 12 years

Pointers in C/C++ are used to directly access and manipulate memory, facilitate dynamic memory allocation, enable efficient array and string handling, and allow functions to modify variables from calling contexts through reference.
Comments

View 1 more Answers

Related Questions

Can a function defined inside another function?
No, you can call other function(s) inside a function but you cannot define a new function in it.
Kamal
0 0
8
what is the significance of lvalue?
An lvalue (locator value) represents an object that occupies some identifiable location in memory (i.e. has an address).
Abhishek
How do you override a defined macro?
We can use the #ifdef and #undef directive to undefine a previously defined macro.
Sharmistha
If one leaves a lot of space in a C language code, will it require more space in a hard disk and RAM?
Head files tells system, how to deal with different functions with program such as printf(), scanf() , getche() etc. so you must have reference to it.
Abhishek
0 0
5
What is "&" called in C language?
In the C programming language, the "&" symbol is called the "address-of" operator. It is used to obtain the memory address of a variable. When you use "&" followed by a variable name, it provides...
Soumya
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Do You Know How Is Size Of Structure Defined?
Size of the structure is defined based on multiplies of bigger data type member in the structure. Example: If a structure contains integer, char, short data type, then size of the Structure will be multiples...

Some interview questions for freshers on C language
Q1. What are the two forms of #include? There are two variants of #include. The one is #include and the other one is #include”file”. In general the first form that is #include is used to...

C and C++ programming with memory level debugging
Understanding C and C++ programming by using memory level debugging. Step 1: Understand the Memory map of C executable Step 2: Start memory level debugging using popular IDE Step 3: Find the memory...

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...

PRACTISE makes you PERFECT ; ; ; There is no SUBSTITUTE for HARD WORK ;;;;Breathe SUCCESS like OXYGEN
Proper Planning ( reg what portions to be covered today) revising today's class portions & clarifying doubts solving Maths problems regularly ,noting down formulae separately trying to understand...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more