473,783 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About 30 chapters on C++ doubts

http://concentratedlemonjuice.blogsp...n-my-blog.html

Try this one for 30 chapters on C++ doubts,
Jun 27 '08 #1
3 1386
On Jun 9, 6:14*pm, "parag_p...@hot mail.com" <parag_p...@hot mail.com>
wrote:
http://concentratedlemonjuice.blogsp...t-c-puzzles-on...

Try this one for 30 chapters on C++ doubts,
Also added some genuine puzzles found on the way.
Jun 27 '08 #2
On 9 Jun., 15:14, "parag_p...@hot mail.com" <parag_p...@hot mail.com>
wrote:
http://concentratedlemonjuice.blogsp...t-c-puzzles-on...

Try this one for 30 chapters on C++ doubts,
The first entry I took was item 20, which had item #93 as its first
item:

93. Why qsort is Still Useful in C++
C++ defines a set of generic algorithms such as sort and find.
However, the corresponding C algorithms, qsort and bsearch, are still
useful in C++ programs for at least three reasons:
• Legacy code. Familiarity with C algorithms is needed to maintain
legacy C code.
[you had that one right]

• Efficiency. You cannot apply STL algorithms to items that are not
stored in an STL container. [ wrong! ]
To apply these algorithms to a built-in array, you first have to copy
it into a container [ wrong! ]
--an operation that incurs runtime overhead.
• Applicability to non-OO data types. STL algorithms rely on operators
== and >.
[ wrong! ]
However, these operators are either meaningless or not defined when
applied to plain structs or built-in arrays. C algorithms do not rely
on these operators to work.

So for that one item you had three wrongs and one right.
I hope you remove those pages - a beginner might find them and believe
you.

/Peter
Jun 27 '08 #3
On Jun 10, 12:28*am, peter koch <peter.koch.lar ...@gmail.comwr ote:
On 9 Jun., 15:14, "parag_p...@hot mail.com" <parag_p...@hot mail.com>
wrote:
http://concentratedlemonjuice.blogsp...t-c-puzzles-on...
Try this one for 30 chapters on C++ doubts,

The first entry I took was item 20, which had item #93 as its first
item:

93. Why qsort is Still Useful in C++
C++ defines a set of generic algorithms such as sort and find.
However, the corresponding C algorithms, qsort and bsearch, are still
useful in C++ programs for at least three reasons:
• Legacy code. Familiarity with C algorithms is needed to maintain
legacy C code.
[you had that one right]

• Efficiency. You cannot apply STL algorithms to items that are not
stored in an STL container. [ wrong! ]
To apply these algorithms to a built-in array, you first have to copy
it into a container [ wrong! ]
--an operation that incurs runtime overhead.
• Applicability to non-OO data types. STL algorithms rely on operators
== and >.
[ wrong! ]
However, these operators are either meaningless or not defined when
applied to plain structs or built-in arrays. C algorithms do not rely
on these operators to work.

So for that one item you had three wrongs and one right.
I hope you remove those pages - a beginner might find them and believe
you.

/Peter
I actually want to get them correct over time. This is not a paste and
forget attempt from me.
I will keep asking them individually over a period, start discussions
and get to the bottom of all of them.
This is an attempt to solve problems when a question and probable
asnswer is in hand. In the forums like this I typically come across a
visible network of though processes. Not everybody thinks same, no
geography or demography explains or demarks itself in their anwering
methods, but experts differ and they produce scenarios .
I really enjoy being able to get in touch with you, who make so much
difference to the answers I have

I appreciate it
-Parag
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2735
by: kazack | last post by:
Hi all it's me again with another question as I got further in my book. The chapter I am in covers structres, abstract data and classes. I only read through to the end of the coverage on structures. Trying to comprehend this is harder than I thought it was going to be. I should of just skipped this chapter and went right into pointers since they seem to be easier to use. But anyways here i smy question: you define a structure...
0
1519
by: abbas reji | last post by:
--0-599929911-1059996886=:4358 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline ________________________________________________________________________
7
1563
by: Generic Usenet Account | last post by:
For a template class, all the inline functions are not checked by the compiler for syntax errors until and unless those inline functions are explicitly called by the user in the code. Don't believe me? Try it out yourself ;-) Of course we all know that for a non template class, all the inline functions are compiled and any encountered errors are reported during compilation steps. Looking back it does seem reasonable behavior,...
6
1827
by: Andreas Prilop | last post by:
What exactly are Chapters and Sections in the <LINK REL=...> tag? I have put some <LINK REL="Chapter"> tags into http://www.unics.uni-hannover.de/nhtcapri/bidirectional-text.html Is this the intended use? If not - how are Chapters and Sections supposed to be used? Are there any good examples?
1
2504
by: Chris Leffer | last post by:
Hi. Reading some Microsoft materials about asp.net I came into two doubts. The following sentence is found on the topic "Application State" in the NET Framework documentation: "Calling Lock on the Application object causes ASP.NET to block attempts by code running on other worker threads to access anything in application state"
1
1187
by: NagaKiran | last post by:
Hi I want to post VBA related doubts. Where can I post my doubts in VBA? thanks bye
23
2317
by: Ray | last post by:
Hello! I've been reading about PyPy, but there are some things that I don't understand about it. I hope I can get some enlightenment in this newsgroup :) First, the intro: <excerpt> "The PyPy project aims at producing a flexible and fast Python
1
1664
by: 418928 | last post by:
Hi everybody, I have some doubts about RDF. I hope you can help me with them: -In http://www.w3.org/TR/rdf-primer, they use the namespace "http://www.example.org/terms/">", but the URL "http:// www.example.org" does not exist, so it doesn't define any terms. Is this out-of-date? -Difference between rdf:about and rdf:ID. Can I use only rdf:about?
3
13256
by: Rahul Babbar | last post by:
Hi, I had the following doubts about the "For Read Only" clause. 1. How does a "for Read only" clause improve the performance? 2. How does a "for Read only" clause compare with "With UR" clause in performance? Which is faster? Can someone clarify on that?
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.