हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा ११

Consider the following C++ statement. Are they equivalent? char ch = 67; char ch = ‘C’; - Computer Science

Advertisements
Advertisements

प्रश्न

Consider the following C++ statement. Are they equivalent?

char ch = 67;

char ch = ‘C’;

टिप्पणी लिखिए

उत्तर

Both the statements are equivalent as they declare ‘ch’ to be char and initialize it with the value of 67. Since this is the ASCII code for ‘C’, the character constant also can be used to initialize ‘ch’ to 67.

shaalaa.com
Lexical Units (Tokens)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 9: Introduction to C++ - Data Types, Variables and Expressions - Evaluation - Section - B [पृष्ठ १५०]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
अध्याय 9 Introduction to C++
Data Types, Variables and Expressions - Evaluation - Section - B | Q 5. | पृष्ठ १५०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×