Tải bản đầy đủ (.pdf) (10 trang)

Lecture Visual programming: Chapter 5 - Muhammad Bilal Zafar - TRƯỜNG CÁN BỘ QUẢN LÝ GIÁO DỤC THÀNH PHỐ HỒ CHÍ MINH

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (215.56 KB, 10 trang )

<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1></div>
<span class='text_page_counter'>(2)</span><div class='page_container' data-page=2>

<b>Overview </b>


<b>of</b>



</div>
<span class='text_page_counter'>(3)</span><div class='page_container' data-page=3>

Over View



Ø Interactive development environment is a software application that


provides comprehensive facilities to computer programmers for software
development.


Ø Microsoft Visual Studio is an integrated development environment (IDE)


from Microsoft Corporation.


Ø Developed on .Net framework


</div>
<span class='text_page_counter'>(4)</span><div class='page_container' data-page=4>

Over View..



Ø C++


Ø Keywords Reserved words int, main, class, define
Ø Identifiers Programmers defined variables


Ø Variables A named storage location in the computer’s


memory for holding a piece of data.


Ø Data Types When computer programs store data in variables,


each variable must be assigned a specific data type.



Some common data types include integers, floating point
numbers, characters, strings, and arrays.


</div>
<span class='text_page_counter'>(5)</span><div class='page_container' data-page=5>

Over View...



Ø Cout >> and Cin <<


Ø A namespace is a part of the program in which certain names


are recognized; outside of the namespace they’re unknown.


Ø Escape Sequences /n, /t, //, /’, /” …


Ø Library Functions


Ø sqrt()
Ø rand()


</div>
<span class='text_page_counter'>(6)</span><div class='page_container' data-page=6>

Over View...



Ø Looping structures


Ø For loop
Ø While
Ø Do While


Ø Decision structures


Ø If



Ø If / else
Ø Switch


</div>
<span class='text_page_counter'>(7)</span><div class='page_container' data-page=7>

<b>TODAY’S LESSON</b>



</div>
<span class='text_page_counter'>(8)</span><div class='page_container' data-page=8>

Contents



Ø Operator Precedence


Ø Type Conversion and Casting
Ø Auto Keyword


Ø Discovering Types
Ø Bitwise Operators


Ø L Values and R Values
Ø Storage Duration


Ø Variable Scopes
Ø Static Variables
Ø Namespaces


</div>
<span class='text_page_counter'>(9)</span><div class='page_container' data-page=9>

Operator Precedence



Ø Operator precedence orders the operators in a priority


sequence.


Ø In any expression, operators with the highest precedence are



always executed first, followed by operators with the next
highest precedence, and so on, down to those with the
lowest precedence of all.


</div>
<span class='text_page_counter'>(10)</span><div class='page_container' data-page=10>

Operator Precedence..



Ø

In an expression with more than one operator,



evaluate in this order:



- (unary negation), in order, left to right


* / %, in order, left to right
+ -, in order, left to right


Example expression

<sub>2 + 2 * 2 </sub>

<sub> 2 </sub>



</div>

<!--links-->

×