Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Introduction to computer and programming - Lecture No 26
tailieunhanh - Lecture Introduction to computer and programming - Lecture No 26
The contents of this chapter include all of the following: Functions and the lambda calculus; haskell: Introduction, expressions, lists and list comprehensions, elementary types and values, control flow, defining functions, tuples. | CSC103: Introduction to Computer and Programming Lecture No 26 Previous lecture Pointer to a structure Dynamic memory allocation for structure Passing a structure to a function Today’s lecture outline Example program – structure C preprocessor directives Macro expansion File inclusion Conditional Compilation Example Program Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Create a variable of that structure, input value from user and then display those values. Write a program Preprocessor directive Preprocessor directives are the special instruction to C compiler Preprocessor directive are resolved before compilation of program Each preprocessor directive begins with # and can be placed anywhere in the program Following preprocessor directives are used mostly Macro expansion File inclusion Conditional Compilation Macro expansion Preprocessor Macro definition Cont. && || Cont. A #define directive could be used to replace a condition Cont. A #define directive could be used to replace an entire C statement. Macros with Arguments Preprocessor Multi line marcos Go to program Macros versus Functions It seams that macro calls are ‘like’ function calls, they are not really the same things In a macro call the preprocessor replaces the macro template with its macro expansion In function call control is transferred to a function, function do processing and then control is returned back Macro call and expansion Cont. when is it best to use macros with arguments and when is it better to use a function Usually macros make the program run faster but increase the program size whereas functions make the program smaller and compact . if we used macro 100 times, then macro expansion goes in source code 100 time before compilation process If a function is called 100 times, it will make same amount of space in the program Cont Conclusion: If macro is simple and small than it can be used to avoid function calls . | CSC103: Introduction to Computer and Programming Lecture No 26 Previous lecture Pointer to a structure Dynamic memory allocation for structure Passing a structure to a function Today’s lecture outline Example program – structure C preprocessor directives Macro expansion File inclusion Conditional Compilation Example Program Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Create a variable of that structure, input value from user and then display those values. Write a program Preprocessor directive Preprocessor directives are the special instruction to C compiler Preprocessor directive are resolved before compilation of program Each preprocessor directive begins with # and can be placed anywhere in the program Following preprocessor directives are used mostly Macro expansion File inclusion Conditional Compilation Macro expansion Preprocessor Macro definition Cont. && || Cont. A #define directive could be used to replace
Quỳnh Chi
78
1
pptx
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Bấm vào đây để xem trước nội dung
Tải xuống
TÀI LIỆU LIÊN QUAN
Pro PHP and iQuery
401
104
0
Principles of Programming Languages
166
128
0
Lecture Programming languages (2/e): Chapter 12b - Tucker, Noonan
14
98
0
Discovering Computers - Chapter 13: Programming Languages and Program Development
51
100
0
Beginning Algorithms
591
111
0
PHP Game Programming
377
114
0
LAND OF LISP
508
81
0
Lecture Programming languages (2/e): Chapter 14a - Tucker, Noonan
18
86
0
Lecture Programming languages (2/e): Chapter 15a - Tucker, Noonan
20
86
0
Lecture Programming languages (2/e): Chapter 12d - Tucker, Noonan
38
92
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461916
55
Giới thiệu :Lập trình mã nguồn mở
14
22912
64
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10961
531
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10149
450
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9557
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8346
1127
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8270
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7883
2224
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6780
255
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5982
1440
TỪ KHÓA LIÊN QUAN
Kỹ thuật lập trình
Programming languages
Computing systems
C programming language
Introduction to computer
Operating system software
Introduction to computer
experience in programming
software engineering
programming languages
computer programming
programming tips
programming experience
code programming
design tips
programming documentation
programming skills
the Ruby programming document
methods Ruby programming language
Lecture Programming languages
Ngôn ngữ lập trình
Imperative programming
Imperative languages
Dynamic allocation
Discovering Computers
Program Development
Low Level Languages
Procedural Languages
Object Oriented Programming Languages
java programming language C + +
C programming
computer software
computer engineering
computer programming language PHP
Functional programming
Functional programming models
Lambda calculus
Logic programming
Logic programming in prolog
Prolog program elements
Scripting languages
Lecture Introduction to computing
Bài giảng Nhập môn máy tính
Introduction to computing
Role of programming languages
Android Programming
Java
programming code
Procedural abstraction
Data structures
Matrix multiplication
Object oriented programming
Abstract data types
The object model
Object oriented language
Represent polynomials
Symbolic differentiation
Mixed language
Scripting language
Semantics of clite
List comprehensions
Practical aspects of prolog
Natural language processing
Event driven programming
Event driven control
Event handling
Java applet
Tic Tac Toe
TÀI LIỆU MỚI ĐĂNG
extremetech Hacking BlackBerry phần 9
31
260
0
13-05-2024
Management and Services Part 1
10
165
0
13-05-2024
Công nghiệp gang thép Việt Nam : Một giai đoạn phát triển và chuyển đổi chính sách mới part 5
6
199
0
13-05-2024
Đóng mới oto 8 chỗ ngồi part 9
10
123
0
13-05-2024
QUẢN LÝ CHẤT LƯỢNG KHÔNG KHÍ
75
142
0
13-05-2024
Christmas Meditations on the Twelve Holy Days
173
109
0
13-05-2024
ĐỀ THI THỬ ĐẠI HỌC 2009 – THPT ĐÔNG SƠN 1 – LẦN 2 – MÔN TOÁN
8
103
0
13-05-2024
Thương hiệu sản phẩm làng nghề: Đã ít, lại thiếu tính cạnh tranh
5
121
0
13-05-2024
Bảng màu theo chữ cái – V
11
103
0
13-05-2024
báo cáo hóa học:" Perceptions of rewards among volunteer caregivers of people living with AIDS working in faith-based organizations in South Africa: a qualitative study"
10
88
0
13-05-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7883
2224
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5982
1440
Ebook Chào con ba mẹ đã sẵn sàng
112
3780
1248
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5385
1137
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8346
1127
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3532
651
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10961
531
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3727
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4146
523
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4173
481
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.