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 8774749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:38:48+00:00 2026-06-13T18:38:48+00:00

In the following program I commented the statement #include <ctype.h> in the hope that

  • 0

In the following program I commented the statement #include <ctype.h> in the hope that an error will be thrown while using the functions like isupper and isgraph. But to my surprise no error is thrown. Why is this so ? The wikipedia page lists these functions in the header type ctype.h.

#include <stdio.h>
//#include <ctype.h>

int main() {
char ch;
for(;;) {
   ch = getc(stdin);
   if( ch == '.') break;
   int g = isgraph(ch);
   if(isupper(ch) != 0) printf("Is in upper case\n");
}   
return 0;   
 }

Note: I am using gcc to compile on linux (fedora).

  • 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-06-13T18:38:49+00:00Added an answer on June 13, 2026 at 6:38 pm

    By default, gcc runs in a rather permissive mode. You can get a warning by adding, for example:

     gcc -Wall -c yourfile.c
    

    asking for all the main warnings. (There are more warnings you can asl for: -Wextra adds a bunch.) You might also specify -std=c99 (and maybe -pedantic) in order to get more warnings.

    C99 requires functions to be defined or declared before they are used.

    $ gcc -O3 -g -std=c99 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -c warn.c
    warn.c:4:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
    warn.c: In function ‘main’:
    warn.c:4:5: warning: old-style function definition [-Wold-style-definition]
    warn.c:9:4: warning: implicit declaration of function ‘isgraph’ [-Wimplicit-function-declaration]
    warn.c:10:4: warning: implicit declaration of function ‘isupper’ [-Wimplicit-function-declaration]
    warn.c:9:8: warning: unused variable ‘g’ [-Wunused-variable]
    $
    

    That’s the output of GCC 4.7.1 (on Mac OS X 10.7.5) with the standard set of compilation options I use — run on your source code stashed in a file warn.c.

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

Sidebar

Related Questions

In the following program, DummyMethod always print 5. But if we use the commented
The following program I'm creating will allow the user will input values to create
The following program, compiled with g++ 4.6, yields the error request for member ‘y’
The following program doesn't build in VS11 beta, gcc 4.5, or clang 3.1 #include
I have the following problem and I hope someone will be able to help
Assume the following code: #include <string> #include <iostream> using namespace std; struct A {
When I compile the pared-down program below, I get the following error from the
The following program expects user input in the mixed fraction format 'whole_numbernumerator/denominator' and assigns
The following program: import multiprocessing,operator f = operator.itemgetter(0) # def f(*a): return operator.itemgetter(0)(*a) if
the following program force quit and crashes, I don't understand why, import android.app.Activity; import

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.