Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. HELP ME TO KNOW SOME C LANGUAGE KEWORDS

HELP ME TO KNOW SOME C LANGUAGE KEWORDS

Scheduled Pinned Locked Moved Managed C++/CLI
help
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hamsika rani
    wrote on last edited by
    #1

    help me to know about the some of the keywords in C language they r REGISTER,STATIC,UNION,SIGN AND UNSIGN pls take out some time and try to give me with examples.

    J M C 3 Replies Last reply
    0
    • H Hamsika rani

      help me to know about the some of the keywords in C language they r REGISTER,STATIC,UNION,SIGN AND UNSIGN pls take out some time and try to give me with examples.

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      Let’s see: 1) auto -> modifier automatic (ignore) 2) break -> break out of loop or ‘switch – case’ construct 3) case -> part of ‘switch –case’ construct 4) char -> a signed single byte (8-bits) character (normally) 5) const -> a promise that you are not going to change the value of a variable 6) continue –> goto start of loop 7) default –> default case in ‘switch – case’ construct 8) do –> start of ‘do-while loop’ construct 9) double –> double precision numeric value 10) else –> ‘if – then – else’ construct 11) enum -> a grouping of int sized named constants 12) extern -> declaration of a named item is in external file (normally ignored) 13) for -> start of for loop ( for( i=0; i goto named label (rarely used and only if absolutely required) 15) if -> test if true ( if( f != 0 ) do something ) 16) int -> whole numeric value (no decimal point) (size of machine word in theory) 17) long -> whole numeric value (size ?) 18) register -> suggestion to compiler to place variable in register (normally ignored) 19) return -> return variable to calling function 20) short -> 16-bit integer (int) variable 21) signed -> (modifier) sign matters +/- (ignored, because it is default behavior) 22) sizeof -> size of variable (in C++ size of object, which is not the same thing) 23) static -> life time (exist in permanent memory) 24) struct -> a grouping of values or a record. 25) switch -> start of ‘switch – case’ construct 26) typedef -> method for giving a user defined type a name 27) union -> method of combining types (rarely used) 28) unsigned -> (modifier) all values are positive ( unsigned int ) 29) void -> no return value, or no argument 30) volatile -> you can change value any time (stupid – ignore – default behavior) 31) while -> start of ‘while loop’, end of ‘do while loop’ Hmmm! I think that is all but I thought there where 32 keywords. Any way there are still 14 preprocessor keywords. Oh – by the way, the keywords are case sensitive.

      INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

      H 1 Reply Last reply
      0
      • H Hamsika rani

        help me to know about the some of the keywords in C language they r REGISTER,STATIC,UNION,SIGN AND UNSIGN pls take out some time and try to give me with examples.

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        In addition to Mr. Shaw's list, you can read more about the keywords here: C++ Keywords[^] and C/C++ Keywords[^] and Google "C Keywords"[^]

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        1 Reply Last reply
        0
        • J John R Shaw

          Let’s see: 1) auto -> modifier automatic (ignore) 2) break -> break out of loop or ‘switch – case’ construct 3) case -> part of ‘switch –case’ construct 4) char -> a signed single byte (8-bits) character (normally) 5) const -> a promise that you are not going to change the value of a variable 6) continue –> goto start of loop 7) default –> default case in ‘switch – case’ construct 8) do –> start of ‘do-while loop’ construct 9) double –> double precision numeric value 10) else –> ‘if – then – else’ construct 11) enum -> a grouping of int sized named constants 12) extern -> declaration of a named item is in external file (normally ignored) 13) for -> start of for loop ( for( i=0; i goto named label (rarely used and only if absolutely required) 15) if -> test if true ( if( f != 0 ) do something ) 16) int -> whole numeric value (no decimal point) (size of machine word in theory) 17) long -> whole numeric value (size ?) 18) register -> suggestion to compiler to place variable in register (normally ignored) 19) return -> return variable to calling function 20) short -> 16-bit integer (int) variable 21) signed -> (modifier) sign matters +/- (ignored, because it is default behavior) 22) sizeof -> size of variable (in C++ size of object, which is not the same thing) 23) static -> life time (exist in permanent memory) 24) struct -> a grouping of values or a record. 25) switch -> start of ‘switch – case’ construct 26) typedef -> method for giving a user defined type a name 27) union -> method of combining types (rarely used) 28) unsigned -> (modifier) all values are positive ( unsigned int ) 29) void -> no return value, or no argument 30) volatile -> you can change value any time (stupid – ignore – default behavior) 31) while -> start of ‘while loop’, end of ‘do while loop’ Hmmm! I think that is all but I thought there where 32 keywords. Any way there are still 14 preprocessor keywords. Oh – by the way, the keywords are case sensitive.

          INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

          H Offline
          H Offline
          Hamsika rani
          wrote on last edited by
          #4

          thanks a lot for responding for my queries. regards rani

          J 1 Reply Last reply
          0
          • H Hamsika rani

            thanks a lot for responding for my queries. regards rani

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            Remember to keep in mind that some keywords act differently in C++. char temp[10]; /* array of 10 characters */ sizeof(temp) -> is size of pointer in C – currently that is 4 bytes sizeof(temp) -> is size of object in C++ - which is 10 characters

            INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

            1 Reply Last reply
            0
            • H Hamsika rani

              help me to know about the some of the keywords in C language they r REGISTER,STATIC,UNION,SIGN AND UNSIGN pls take out some time and try to give me with examples.

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              I'm glad you got your answer, but please don't post C questions in the C++/CLI forum in future.

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups