04 | variable lvalue and rvalue in C Programming Language Tutorials

Publié le: 27 mai 2017
sur la chaîne: Coding Funda
531
13

This tutorial is for clearing the variable defination,declaration , lvalue , rvalue concept in c language. Also some important interview questions.

Answer 1: Option B

Explanation:

extern int fun(); declaration in C is to indicate the existence of a global function and it is defined externally to the current module or in another file.

int fun(); declaration in C is to indicate the existence of a function inside the current module or in the same file.

Answer 2: Option A

Explanation:

Declaring is the way a programmer tells the compiler to expect a particular type, be it a variable, class/struct/union type, a function type (prototype) or a particular object instance. (ie. extern int i)

Declaration never reserves any space for the variable or instance in the program's memory; it simply a "hint" to the compiler that a use of the variable or instance is expected in the program. This hinting is technically called "forward reference".

Answer 3: Option C

Explanation:


extern int x; - is an external variable declaration.

double pow(double, double); - is a function prototype declaration.

Therefore, 1 and 3 are declarations. 2 is definition.
Answer 4: Option A

Explanation:

- During declaration we tell the datatype of the Variable.

- During definition the value is initialized.

~-~~-~~~-~~-~
Please watch: "(5) 5 | Auto, Register, Static, Extern storage classes in C Programming Language Tutorials "
   • 5 | Auto, Register, Static, Extern st...  
~-~~-~~~-~~-~


Sur cette page du site, vous pouvez voir la vidéo en ligne 04 | variable lvalue and rvalue in C Programming Language Tutorials durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coding Funda 27 mai 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 531 fois et il a aimé 13 téléspectateurs. Bon visionnage!