Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6779505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:23:34+00:00 2026-05-26T16:23:34+00:00

This is taken from Exercise 19 of The Pragmatic Programmer. A quick reality check.

  • 0

This is taken from Exercise 19 of The Pragmatic Programmer.

A quick reality check. Which of these “impossible” things can happen?:

  1. A month with fewer than 28 days

  2. stat(“.” ,&sb) == -1 (that is, can’t access the current directory)

  3. In C++: a = 2; b = 3; if (a + b != 5) exit(1);

  4. A triangle with an interior angle sum ≠ 180 °

  5. A minute that doesn’t have 60 seconds

  6. In Java: (a + 1) <= a

I have some answers but I don’t think my answers are “right” (in the sense that it is the answer that the writers were thinking about when they wrote the question).

This is my attempt:

1) September 1752

2) –I think we can skip this, not understanding the question–

3) I don’t know C++, but is it something to do with threading and volatile variables (like Java) ?

4) impossible..

5) Due to occurence of leap Seconds

6) double a = 100000000000000001d;

I was wondering does anyone know the correct answer to these questions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:23:35+00:00Added an answer on May 26, 2026 at 4:23 pm

    3: If a and b are of class type then the overloaded operator+ could do anything (or an overloaded assignment operator, or operator !=, or even an implicit conversion operator for that matter).

    4: A triangle on a curved surface does not have an interior angle sum of 180.

    6: Overflow in a.

    The point of the questions is IMHO to demonstrate that a lot of “impossible” things do actually happen, and that you might not just be being paranoid when you are programming very defensively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code which is taken from MVC futures and attach the Attribute
This exercise is taken from Google's Python Class : D. Given a list of
I am using this code taken from here : import smtplib def prompt(prompt): return
This is inspired by/taken from this thread: http://www.allegro.cc/forums/thread/603383 The Problem Assume the user gives
This example is taken from w3schools . CREATE TABLE Persons ( P_Id int NOT
This problem is taken from interviewstreet.com Given array of integers Y=y1,...,yn, we have n
I'm struggling to find how to call the equivalent of (taken from this article
This is a code sample taken from the Google Maps API developer's guide. I'm
I have taken this example from net . But when i tried it is
i got this SQL query where post_title taken from $_GET $sql = SELECT ID

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.