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
Tài liệu HOT
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
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Introduction to computer and programming - Lecture No 22
TAILIEUCHUNG - Lecture Introduction to computer and programming - Lecture No 22
In this section, we introduce the features of JML as they apply to the formal specification and verification of an individual function, such as the Factorial function that we specified and verified by hand in the previous section. We also show how JML allows us to specify run-time exceptions, providing a more robust vehicle than the pure Hoare triples in a real computational setting where exceptions actually occur. | CSC103: Introduction to Computer and Programming Lecture No 22 Previous lecture Strings Null character Memory map of string String initialization Display string content Input string from user Passing a string to a function Today’s lecture outline Standard library string functions strlen() strcpy() strcat() strcmp() Standard Library String Functions With every C compiler a large set of useful string handling library functions are provided strlen( ), to find length of string strcpy( ), to copy content of one string in another strcat( ) to append content of one string after the content of other string strcmp( ) to compare on string with another strlen( ) Short for string length This function counts the number of characters present in a string Prototype int strlen(char *); The base address of the string must be pass when calling strlen function char str1[ ] = “hello”; strlen(str1) call will return 5 not 6 \0 is not the part of string it is just character that tells where this string terminates h e l l o \0 65508 65509 65510 65511 65512 65513 str1[6] strlen() – program Go to program mystrlen( ) h e l l o \0 500 501 502 503 504 505 a[6] len . . . . . . *s 0 length 500 501 502 503 504 505 1 2 3 4 5 5 *s != ‘\0’ *(500) != ‘\0’ ‘h’ != ‘\0’ *s != ‘\0’ *(501) != ‘\0’ ‘e’ != ‘\0’ *s != ‘\0’ *(502) != ‘\0’ ‘l’ != ‘\0’ *s != ‘\0’ *(503) != ‘\0’ ‘l’ != ‘\0’ *s != ‘\0’ *(504) != ‘\0’ ‘o’ != ‘\0’ *s != ‘\0’ *(505) != ‘\0’ ‘\0’ != ‘\0’ true true true true true false Go to program strcpy( ) This function copies the contents of one string into another The base addresses of the source and target strings should be supplied to this function Prototype void strcpy (char *t, char *s); strcpy() - program Go to program mystrcpy( ) h e l l o \0 500 501 502 503 504 505 a[6] . . . . . . 600 601 602 603 604 605 b[6] *s 500 501 502 503 504 505 *t 600 601 602 603 604 605 *s != ‘\0’ *(500) != ‘\0’ ‘h’ != ‘\0’ *s != ‘\0’ *(501) != ‘\0’ ‘e’ != ‘\0’ *s != ‘\0’ *(502) != ‘\0’ ‘l’ != ‘\0’ *s != ‘\0’ .
Huệ Thương
80
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
113
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
461913
55
Giới thiệu :Lập trình mã nguồn mở
14
22864
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
10950
531
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10136
449
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
9555
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8336
1127
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8268
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7881
2224
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6764
253
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
5944
1435
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
Bibliography on Medieval Women, Gender, and Medicine 1980-2009
82
215
0
10-05-2024
Trading Strategies Profit Making Techniques For Stock_3
23
187
0
10-05-2024
MySQL Basics for Visual Learners PHẦN 9
15
189
0
10-05-2024
B2B Content Marketing: 2012 Benchmarks, Budgets & Trends
17
143
0
10-05-2024
Đề tài: Tìm hiểu một số yêu cầu đặt ra với một phòng thu âm, để đảm bảo chất lượng âm thanh trong sản phẩm đa phương tiện
8
164
1
10-05-2024
Giáo trình CẤU TRÚC DỮ LIỆU VÀ GIẢI THUẬT - Chương 1
5
131
0
10-05-2024
GIÁO TRÌNH VI XỬ LÝ 1 - CHƯƠNG 5. LẬP TRÌNH CHO VI ĐIỀU KHIỂN 80C51
23
114
1
10-05-2024
Fecal Incontinence Diagnosis and Treatment - part 8
35
106
0
10-05-2024
Gastroenterology an illustrated colour text - part 10
10
92
0
10-05-2024
Báo cáo nghiên cứu nông nghiệp " Field control of pest fruit flies in Vietnam "
14
120
0
10-05-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7881
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
5944
1435
Ebook Chào con ba mẹ đã sẵn sàng
112
3779
1247
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5373
1137
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8336
1127
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3531
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
10950
531
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3721
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4130
522
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4163
481
Đã 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.