/* Experiment to find out what happens when printf's argument string contains \c, where c is some character not listed above. */ #include <stdio.h> main() { printf("hello world\y"); printf("hello world\7"); printf("hello wor…
/* Run the "hello, world" program on your system. Experiment with leaving out parts of the program to see what error messages you get. */ #include <stdio.h> main() { printf("hello world\n"); }…
/* Revise the main routine of the longest-line program so it will correctly print the length of arbitrarily long input lines, and as much as possible of the text. */ #include <stdio.h> #define MAXLINE 1000 /* maximum input line size */ int getline(c…
/* Write a program to count blanks, tabs, and newlines. */ #include <stdio.h> /* count blanks, tabs, and newlines */ main() { int c, nb, nt, nl; nb = 0; /* number of blanks */ nt = 0; /* number of tabs */ nl = 0; /* number of newlines */ while((c =…
/* Modify the temperature conversion program to print the table in reverse order, that is, from 300 degrees to 0. */ #include <stdio.h> /* print Fahrenheit-Celsius table in reverse order */ main() { int fahr; for(fahr = 300; fahr >= 0; fahr -= 20…
/* Rewrite the temperature conversion program of Section 1.2 to use a function for conversion. */ #include <stdio.h> float celsius(float fahr); /* print Fahrenheit-Celsius table or fahr = 0, 20, ..., 300; floating-point version */ main() { float fah…
/* Write a program that prints its input one word per line. */ #include <stdio.h> #define IN 1 /* inside a word */ #define OUT 0 /* outside a word */ /* print input one word per line */ main() { int c, state = OUT; while((c = getchar()) != EOF) { if…
/* Write a program to print the corresponding Celsius to Fahrenheit table. */ #include <stdio.h> /* print Celsius-Fahrenheit table for celsius = 0, 20, ..., 300; floating-point version */ main() { float fahr, celsius; int lower, upper, step; lower =…
前言 这是我阅读<The C++ standard library, 2nd Edition>所做读书笔记的第一篇.这个系列基本上会以一章一篇的节奏来写,少数以C++03为主的章节会和其它章节合并,一些内容较多的章节也会抽出几个独立的章节.这些博文不分析具体的应用情景,仅仅用来记录C++11新增的知识点.关于C++11知识点的详细解析,请参考C++11 FAQ:关于C++03以及STL的较详尽解析,请参考相关著作或者网络资料:推荐<C++ Primer,4th edition>和&…
原文网址:http://www.ros.org/news/2017/02/2nd-edition-of-international-robotics-summer-school-robotcraft-2017.html RobotCraft 2017 第二届国际机器人学暑期学校 2nd Edition of International Robotics Summer School 我们很高兴地宣布,第二届国际夏季课程RobotCraft 2017年:机器人技术国际学院,从7月3日至9月3日,在葡…
10-2. 返回输出参数 问题 想获取存储过程里的一个或多个输出参数的值 解决方案 假设我们有一个像Figure 10-1所示的,出租车辆与租金收入的模型 Figure 10-1.出租车辆与租金收入的模型 我们想知道在指定日期里,收入了几笔租金和金额, 以及车辆的租凭情况. 存储过程Listing 10-7 就是获取这些信息的. Listing 10-7. A Stored Procedure for the Vehicles Rented, the Number of Rentals, and…