Posts

Showing posts from March, 2009

वाजवी पावा गोविंद (beautiful Bhimpalas by Babuji)

शरदाचे चांदणे मधुबनी फुलला निशीगंध नाचतो गोपीजन वृंद वाजवी पावा गोविंद ॥ धृ ॥ पैंजण रुणझुणती मेखला कटिवर किणक़िणती वाहते यमुना जळ धुंद वाजवी पावा गोविंद ॥ गायिका: माणिक वर्मा गीत: ग. दि. माडगुळकर संगीत: सुधीर फडके

C quiz with answers

Q1. What is the form of variable name? A1. 1. Should not begin with digit. 2. Sequence of letters and digits. Q2. What are identifiers? A2. Identifiers = symbols. They can refer to 1. variables 2. type 3. functions 4. labels Q3. What are elements of C language? A3. Following 1. Operator 2. Keywords 3. Identifiers 4. Constants 5. String Literals 6. Punctuation and special characters Q4. What are tokens? A4. The basic element recognized by the compiler is the "token". A token is source-program text that the compiler does not break down into component elements. Note: Elements of C language are discussed above.

L-values and R-values

Expressions in C++ can evaluate to l-values or r-values. L-values are expressions that evaluate to a type other than void and that designate a variable. L-values appear on the left side of an assignment statement (hence the "l" in l-value). Variables that would normally be l-values can be made nonmodifiable by using the const keyword; these cannot appear on the left of an assignment statement. Reference types are always l-values. The term r-value is sometimes used to describe the value of an expression and to distinguish it from an l-value. All l-values are r-values but not all r-values are l-values. // lValues_rValues.cppint main() { int i, j, *p; i = 7; // OK variable name is an l-value. 7 = i; // C2106 constant is an r-value. j * 4 = 7; // C2106 expression j * 4 yields an r-value. *p = i; // OK a dereferenced pointer is an l-value. const int ci = 7; ci = 9; // C3892 ci is a nonmodifiable l-value ((i