Token in C++ hindi
किसी program के छोटे-छोटे हिस्से, जिनसे एक program बनता है।
सरल भाषा में, some keywords, alphabet और special character जिनसे जिनसे एक program बनता है, token कहलाते हैं। इनमें से कुछ user defined हैं और predefined , जो c ++ library में पहले से मौजूद होते हैं ।
Type of token in C++
- keyword
- identifier
- operator
- constant
- comments
- string
keyword in C++ in hindi
C ++ में पहले से ही कुछ reserved keywords हैं, जो पहले से ही pre -defined होते हैं। जिन्हे हम अपनी आवश्यकता के अनुसार program किसी task के लिए प्रयोग में लाते हैं।
C ++(Turbo C++) में 48 reserve keyword पाए जाते हैं जो सभी lowercase होते हैं , नीचे table में इसकी व्याख्या दी गयी है –
keywords | Explanation |
---|---|
int |
used to store only numeric types of valueकेवल numeric values को store करने के लिए |
float/ |
केवल decimal values को store करने के लिए |
char |
केवल characters value को store करने के लिए |
void |
एक non-returning type function में तथा void pointer में। |
sizeof |
किसी data type का size ज्ञात करने के लिए , |
const |
एक variable को const type variable declaration के लिए , |
enum |
enum type , data declare करने के लिए , |
typedef |
किसी data type का alias नाम define करने के लिए , |
signed |
एक signed type -modifier data type में , |
unsigned |
एक unsigned type -modifier data type में , |
long |
एक long type medifier declare के लिए , |
short |
एक short type medifier declare के लिए , |
if |
condition statement में use किया जाता है , |
else |
conditional statement में else -body define करने के लिए , |
break |
किसी control statement को break करने में |
switch |
switch statement के लिए , |
case |
switch statement में , case statement, define करने के लिए , |
default |
switch statement में , default statement define करने के लिए , |
for |
looping statement में , for loop के लिए , |
do |
while loop के लिए , |
while |
do – while loop के लिए , |
continue |
program में , किसी statement को skip करने के लिए , |
goto |
program के किसी भाग में control transfer करने के , |
struct |
structure, data – type declare करने के लिए , |
union |
union data – type declare करने के लिए, |
return |
return type function declare करने के लिए , |
inline |
|
auto |
auto variable declaration में , |
static |
static variable और static function declaration में , |
register |
register प्रकार के variables declare करने के लिए , |
extern |
extern प्रकार के variable declare करने के लिए , |
new |
program में ,dynamic memory allocation के लिए , |
delete |
new द्वारा allocated memory को de -locate करने के लिए, |
this |
current object को return करने के लिए , |
class<c/ode> |
class को declare करने के लिए , |
private |
class के private member को declare करने के लिए , |
public |
class में public member को declare करने के लिए , |
protected |
class में protected member को declare करने के लिए , |
friend |
किसी class के लिए friend function declare करने के लिए , |
virtual |
virtual class और virtual function declaration में , |
try |
exception handling में, |
throw |
exception handling में , statement को catch block में throw करने में , |
catch |
program में , error /exception को handle करने के लिए , |
operator |
operator overloading में (polymorphism का feature ) |
template |
|
volatile |
Great