+ 6

What is the use of private key word in c language ?

We will use private keyword for classes in c++ but what is the use of private keyword in c. In c complier the private keyword cannot used as a variable also and why is that ?

19th Feb 2020, 1:32 AM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar
2 Respuestas
+ 9
There is no `private` keyword in C. `private` is valid identifier in C #include <stdio.h> int main() { int private = 6; printf("%d",private); return 0; }
19th Feb 2020, 1:42 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 7
Thanks 🇮🇳Omkar🕉 I was just going to say that c has no 'private' keyword as that was something that came into cpp. Here are some other keywords that you may not have known as far as c https://en.m.wikibooks.org/wiki/C_Programming/Language_Reference
19th Feb 2020, 1:47 AM
BroFar
BroFar - avatar