C keyword index: C17 aur C23
Har standard keyword spelling ko edition, role aur deeper explanation link ke saath browse karein.
Is chapter mein10 sections
Is chapter ko lookup page ki tarah use karein. Keyword dhoondhein, uski spelling kis C edition mein aayi check karein aur explanation ke liye concept link kholein. C samajhne se pehle poori list yaad karna zaroori nahi.
1. Spelling dhoondhein, phir selected standard check karein
C89/C90 ne 32 keywords introduce kiye; C99 mein total 37 hua; C11/C17 mein 44 hain. C23 mein 54 primary keyword spellings aur paanch older alternatives hain: is index mein 59 recognized spellings. Alternatives _Alignas, _Alignof, _Bool, _Static_assert aur _Thread_local hain; C23 mein yeh obsolescent hain, simply remove nahi hue.
Neeche ke “introduced” groups historical hain. C23 auto inference jaise older keyword roles bhi badalta hai. alignas, alignof, bool, static_assert, thread_local unke underscored alternatives ki preferred spellings hain. Feature reservation aur availability alag hain: atomic, complex/imaginary aur decimal facilities ke applicable optional-support rules hain.
Jump karein: C89/C90, C99, C11/C17, ya C23 additions. Exact spelling ke liye browser ka Find command use kar sakte hain.
2. C89/C90: original 32
| Keyword | Role / version note | Aage padhein |
|---|---|---|
auto | Automatic storage; C23 mein kuch declaration forms mein type inference bhi | Theory |
break | Nearest loop ya switch se exit | Theory |
case | switch ke andar labeled branch | Theory |
char | Character/small-integer type; sizeof(char) 1 hai | Theory |
const | Is qualified type se read-only access; general compile-time constant ki guarantee nahi | Theory |
continue | Nearest loop continue hota hai (for ka update phir bhi run hota hai) | Theory |
default | switch ki default labeled branch | Theory |
do | Aisa loop jisme condition se pehle body run hoti hai | Theory |
double | Floating-point type; long double ek aur floating type hai | Theory |
else | if ki alternative branch | Theory |
enum | Enumerated type aur enumeration constants | Theory |
extern | Linkage wala object/function declare karta hai; initialized object declaration definition bhi ho sakti hai | Theory |
float | Floating-point type | Theory |
for | Initialization, condition aur update clauses wala loop | Theory |
goto | Same function ke label par jump | Theory |
if | Scalar expression ke basis par conditional execution | Theory |
int | Integer type; required minimum ke baad exact range implementation par depend | Theory |
long | long int, long long int aur long double mein type specifier | Theory |
register | Automatic storage aur optimization suggestion; direct unary & se address nahi le sakte | Theory |
return | Function se return, optionally value ke saath | Theory |
short | Short integer types ka specifier | Theory |
signed | Signed integer types ka specifier | Theory |
sizeof | Type ya expression ka size C bytes mein; result type size_t | Theory |
static | Objects ki static storage duration, file scope par internal linkage; array parameters mein bhi use | Theory |
struct | Ordered members wala structure type | Theory |
switch | Integer controlling expression ke basis par selection | Theory |
typedef | Type ka alias; naya distinct type nahi | Theory |
union | Aisa type jiske members storage share karte hain | Theory |
unsigned | Unsigned integer types ka specifier | Theory |
void | Koi value nahi; void * generic object-pointer type hai | Theory |
volatile | Accesses ki special observable semantics; thread synchronization nahi | Theory |
while | Har iteration se pehle condition check karne wala loop | Theory |
3. C99: paanch additional spellings
| Keyword | Role / version note | Aage padhein |
|---|---|---|
inline | Special definition/linkage rules wala function specifier; call expansion guaranteed nahi | Theory |
restrict | Optimization ke liye pointer-access/aliasing contract | Theory |
_Bool | Boolean type; C23 mein bool ki purani alternative spelling | Theory |
_Complex | Complex floating types; later standards mein support conditional | Theory |
_Imaginary | Optional imaginary types ke liye reserved keyword; support guaranteed nahi | Theory |
4. C11/C17: saat additional spellings
C17 corrections incorporate karke C11 ki yeh spellings retain karta hai. _Noreturn recognized rehta hai, lekin C23 mein [[noreturn]] ke favor mein deprecated hai.
| Keyword | Role / version note | Aage padhein |
|---|---|---|
_Alignas | Object alignment specifier; alignas ki purani spelling | Theory |
_Alignof | Type ki alignment query; alignof ki purani spelling | Theory |
_Atomic | Atomic type specifier/qualifier; poora algorithm automatically atomic nahi hota | Theory |
_Generic | Translation time par type ke basis par expression select | Theory |
_Noreturn | Function caller ko return nahi karta; C23 mein [[noreturn]] preferred | Theory |
_Static_assert | Compile-time assertion; static_assert ki purani spelling | Theory |
_Thread_local | Thread storage duration; thread_local ki purani spelling | Theory |
5. C23: pandrah additional spellings
Yeh C23 language spellings hain. Older standards mein kuch names standard-header macros se milte the; typeof compiler extension bhi tha. Yeh history version distinction remove nahi karti.
| Keyword | Role / version note | Aage padhein |
|---|---|---|
alignas | Alignment specifier; ab header macro ke bina keyword | Theory |
alignof | Alignment-query operator; ab keyword | Theory |
bool | Boolean type; ab keyword | Theory |
constexpr | Constrained initialization wala named constant object; const imply karta hai, C++ constexpr function nahi | Theory |
false | Boolean false predefined constant | Theory |
nullptr | Null-pointer predefined constant; <stddef.h> iske type ko nullptr_t naam deta hai | Theory |
static_assert | Compile-time assertion; ab keyword | Theory |
thread_local | Thread storage duration; ab keyword | Theory |
true | Boolean true predefined constant | Theory |
typeof | Type name ya expression se type derive karta hai; variably modified types mein evaluation care chahiye | Theory |
typeof_unqual | typeof jaisa, top-level aur atomic qualification remove karta hai; pointed-to const rehta hai | Theory |
_BitInt | Bit-precise integer type specifier, _BitInt(N) ki form mein | Theory |
_Decimal32 | Decimal floating type, sirf decimal floating support wali implementations par | Theory |
_Decimal64 | Decimal floating type, sirf decimal floating support wali implementations par | Theory |
_Decimal128 | Decimal floating type, sirf decimal floating support wali implementations par | Theory |
6. A familiar library name is not automatically a keyword
printf library function name hai. size_t aur C23 nullptr_t library headers ke type names hain. NULL macro hai aur [[noreturn]] ka noreturn attribute name hai. include/define jaise preprocessing directive names extra ordinary C keywords nahi. Library aur implementation names ke doosre reservation rules phir bhi apply karte hain.
C17 mein bool/true/false <stdbool.h>, alignas/alignof <stdalign.h>, static_assert <assert.h>, aur supported facility mein thread_local <threads.h> se milte hain. Agla complete C17 example teen header routes demonstrate karta hai; spellings ko C17 language keywords claim nahi karta.
#include <assert.h>
#include <stdbool.h>
#include <stdalign.h>
static_assert(sizeof(char) == 1, "one C byte");
int main(void)
{
alignas(int) int value = 4;
bool ready = true;
assert(ready && value == 4);
return 0;
}
C23 primary spellings ko in macro dependencies ke bina language features banata hai. Isliye keyword list ko standard batana chahiye; har familiar token ko timeless syntax nahi samajhna chahiye.
7. Thought check: reserved spelling support prove karti hai?
Compiler _Decimal64 ko reserved recognize karta hai. Kya decimal floating arithmetic available prove hui?
Nahi. Reservation ordinary identifier use rokta hai; availability implementation ke required/optional feature rules aur documented support se aati hai. Language mode select karein, facility check karein, aur rely karne se pehle relevant capability test compile karein.
Sources aur aage ki reading
Primary references: WG14 N1570 6.4.1, 7.2, 7.15, 7.18, and 7.26; N3096 6.4.1, 6.4.4.5, 6.7.1, 6.7.2.5, and 6.7.9; WG14 N3096 (C23 notes). These are public committee drafts; the examples here use a C17 baseline.
Aage badhne se pehle
- Yeh index corresponding theory chapters se linked lookup aid hai.
- C17 aur C23 mein keyword status aur familiar header macros alag ho sakte hain.
- Spelling pehchaanna uski constraints aur useful contexts samajhne ki shuruaat hai.
In ideas ko alag rakhein
- Keyword / Library name
- Reserved language spelling aur header se supplied name different mechanisms hain.
Apni C edition mein familiar spelling keyword hai ya header macro, yeh kaise check karenge?
Optional: bolkar samjhein ya note rakhein. Tayyar hon toh aage badh sakte hain.Apni understanding check karein
Optional hai. Answers save ya send nahi hote; chapter kabhi lock nahi hota.
Har choice ki explanation padhein
- Haan, har standard library name keyword hai.
Library identifiers aur language keywords alag categories hain.
- Nahi. Yeh <stdio.h> se declared standard library function ka naam hai.
✓ Sahi reasoning. Header declarations deta hai; naam ko language keyword nahi banata.
- Pehli call ke baad hi keyword banta hai.
Function call se identifier ki lexical category nahi badalti.
C17
Earlier edition ka quick reference
Existing section links aur saved passages ke liye retained. Exact corrections source review mein recorded hain.
C mein keywords ka set har standard ke saath evolve hua hai. Neeche di gayi table major C standards ke keywords ko unke meanings aur roles ke saath summarize karti hai.
Table 1: C Language Keywords aur Unke Meanings
| Keyword | Meaning / Role | Standard(s) |
|---|---|---|
auto | Automatic storage; C23 mein kuch declaration forms mein type inference bhi | C89+; inference C23 |
break | Nearest loop ya switch se exit | C89+ |
case | switch ke andar labeled branch | C89+ |
char | Character/small-integer type; sizeof(char) 1 hai | C89+ |
const | Is qualified type se read-only access; general compile-time constant ki guarantee nahi | C89+ |
continue | Nearest loop continue hota hai (for ka update phir bhi run hota hai) | C89+ |
default | switch ki default labeled branch | C89+ |
do | Aisa loop jisme condition se pehle body run hoti hai | C89+ |
double | Floating-point type; long double ek aur floating type hai | C89+ |
else | if ki alternative branch | C89+ |
enum | Enumerated type aur enumeration constants | C89+ |
extern | Linkage wala object/function declare karta hai; initialized object declaration definition bhi ho sakti hai | C89+ |
float | Floating-point type | C89+ |
for | Initialization, condition aur update clauses wala loop | C89+ |
goto | Same function ke label par jump | C89+ |
if | Scalar expression ke basis par conditional execution | C89+ |
int | Integer type; required minimum ke baad exact range implementation par depend | C89+ |
long | long int, long long int aur long double mein type specifier | C89+; long long C99 |
register | Automatic storage aur optimization hint jise compiler ignore kar sakta hai | C89+ |
return | Function se return, optionally value ke saath | C89+ |
short | Short integer types ka specifier | C89+ |
signed | Signed integer types ka specifier | C89+ |
sizeof | Type ya expression ka size C bytes mein; result type size_t | C89+ |
static | Objects ki static storage duration, file scope par internal linkage; array parameters mein bhi use | C89+; array parameters C99 |
struct | Ordered members wala structure type | C89+ |
switch | Integer controlling expression ke basis par selection | C89+ |
typedef | Type ka alias; naya distinct type nahi | C89+ |
union | Aisa type jiske members storage share karte hain | C89+ |
unsigned | Unsigned integer types ka specifier | C89+ |
void | Koi value nahi; void * generic object-pointer type hai | C89+ |
volatile | Accesses ki special observable semantics; thread synchronization nahi | C89+ |
while | Har iteration se pehle condition check karne wala loop | C89+ |
inline | Special definition/linkage rules wala function specifier; call expansion guaranteed nahi | C99+ |
restrict | Optimization ke liye pointer-access/aliasing contract | C99+ |
_Bool | Boolean type; C23 mein bool ki purani alternative spelling | C99+; alternative in C23 |
_Complex | Complex floating types; later standards mein support conditional | C99+ |
_Imaginary | Optional imaginary types ke liye reserved keyword; support guaranteed nahi | C99+ |
_Alignas | Object alignment specifier; alignas ki purani spelling | C11+; alternative in C23 |
_Alignof | Type ki alignment query; alignof ki purani spelling | C11+; alternative in C23 |
_Atomic | Atomic type specifier/qualifier; poora algorithm automatically atomic nahi hota | C11+; conditional support |
_Generic | Translation time par type ke basis par expression select | C11+ |
_Noreturn | Function caller ko return nahi karta; C23 mein [[noreturn]] preferred | C11+; deprecated in C23 |
_Static_assert | Compile-time assertion; static_assert ki purani spelling | C11+; alternative in C23 |
_Thread_local | Thread storage duration; thread_local ki purani spelling | C11+; alternative in C23 |
alignas | Alignment specifier; ab header macro ke bina keyword | C23+ |
alignof | Alignment-query operator; ab keyword | C23+ |
bool | Boolean type; ab keyword | C23+ |
constexpr | Constant-expression initialization wala constant object define | C23+ |
false | Boolean false predefined constant | C23+ |
nullptr | Null-pointer predefined constant; <stddef.h> iske type ko nullptr_t naam deta hai | C23+ |
static_assert | Compile-time assertion; ab keyword | C23+ |
thread_local | Thread storage duration; ab keyword | C23+ |
true | Boolean true predefined constant | C23+ |
typeof | Type name ya expression se derived type | C23+ |
typeof_unqual | typeof jaisa, lekin top-level qualifiers aur atomic qualification hatata hai | C23+ |
_BitInt | Bit-precise integer type specifier, _BitInt(N) ki form mein | C23+ |
_Decimal32 | Decimal floating type, sirf decimal floating support wali implementations par | C23+; conditional support |
_Decimal64 | Decimal floating type, sirf decimal floating support wali implementations par | C23+; conditional support |
_Decimal128 | Decimal floating type, sirf decimal floating support wali implementations par | C23+; conditional support |
Version counts: C89/C90 mein 32, C99 mein 37 aur C11/C17 mein 44 keywords hain. C23 mein 54 primary keyword spellings aur paanch purani alternative spellings (_Alignas, _Alignof, _Bool, _Static_assert, _Thread_local) hain: is table mein total 59 recognized spellings hain. Yeh paanch alternatives C23 mein obsolescent hain. Reserved keyword hone se optional feature ka support guaranteed nahi hota. Header names, NULL, size_t, nullptr_t aur attribute names additional language keywords nahi hain.
Agla idea padhne ke liye tayyar?
Mark this chapter as read whenever you feel ready.