What is the computer program?

原创 2006年05月28日 20:25:00
  • A computer program, also called software, is a way to tell a computer what to do.
  • FunctionMost languages allow you to create functions of some sort. Functions let you chop up a long program into named sections so that the sections can be reused throughout the program. Functions accept parameters and return a result.

 
  • Every library consists of two parts: a header file and the actual code file. The header file, normally denoted by a .h suffix, contains information about the library that programs using it need to know. In general, the header file contains constants and types, along with prototypes for functions available in the library.
  • printf - prints formatted output to stdout
  • scanf - reads formatted input from stdin
  • puts - prints a string to stdout
  • gets - reads a string from stdin
  • putc - prints a character to stdout
  • getc, getchar - reads a character from stdin
  • fopen - opens a text file
  • fclose - closes a text file
  • feof - detects end-of-file marker in a file
  • fprintf - prints formatted output to a file
  • fscanf - reads formatted input from a file
  • fputs - prints a string to a file
  • fgets - reads a string from a file
  • fputc - prints a character to a file
  • fgetc - reads a character from a file



C uses pointers in three different ways:

  • C uses pointers to create dynamic data structures -- data structures built up from blocks of memory allocated from the heap at run-time.

  • C uses pointers to handle variable parameters passed to functions.

  • Pointers in C provide an alternative way to access information stored in arrays. Pointer techniques are especially valuable when you work with strings. There is an intimate link between arrays and pointers in C.

The text editor is a programmer's intimate link to the computer


A process may start many threads or other processes, but a thread cannot start a process.


You can think of the word static as meaning "no matter how many objects are made, there will be only one of these."

Network

The following is an example of a URL which addresses the Java Web site hosted by Sun Microsystems:

As in the previous diagram, a URL has two main components:
  • Protocol identifier
  • Resource name

The resource name contains one or more of the components listed in the following table:

Host Name The name of the machine on which the resource lives.
Filename The pathname to the file on the machine.
Port Number The port number to which to connect (typically optional).
Reference A reference to a named anchor within a resource that usually identifies a specific location within a file (typically optional).
import java.net.*;
import java.io.*;

public class ParseURL {
public static void main(String[] args) throws Exception {
URL aURL = new URL("http://java.sun.com:80/docs/books/"
+ "tutorial/index.html#DOWNLOADING");
System.out.println("protocol = " + aURL.getProtocol());
System.out.println("host = " + aURL.getHost());
System.out.println("filename = " + aURL.getFile());
System.out.println("port = " + aURL.getPort());
System.out.println("ref = " + aURL.getRef());
}
}
Here's the output displayed by the program:
protocol = http
host = java.sun.com
filename = /docs/books/tutorial/index.html
port = 80
ref = DOWNLOADING

linux安装问题:what is the location of the gcc program on your machine

今天在vm上的centos7安装vmware tools时,问我gcc在哪个位置,然后我并没有照着网上去下载脚本什么的。 直接输入 no。意思就是跳过gcc的安装了。但是系统虽然安装了vmware ...
  • ya_1249463314
  • ya_1249463314
  • 2017年02月15日 09:42
  • 3546

what is the location of the gcc program on your machine

转载自百度知道:http://zhidao.baidu.com/question/164920209.html     在虚拟机中安装了Red Hat Linux9,然后装VMtools,光盘自...
  • xtm_rongbing
  • xtm_rongbing
  • 2013年03月14日 14:48
  • 3246

stored-program Computer/von Neumann Architecture 冯诺依曼体系结构

0.Computer is an integration of hardwware and software. 计算机是硬件与软件的结合体 1.Computer consists of datap...
  • u011002533
  • u011002533
  • 2017年10月25日 22:30
  • 136

CentOS6.0 安装VMWare tools遇到到问题“What is the location of the directory..."

CentOS6.0  为desktop安装环境,在安装VMWare tools时遇到 gcc未安装到问题, 直接 yum -y install gcc 完成安装。 再次尝试安装VMWare tool...
  • ddl007
  • ddl007
  • 2011年11月07日 23:13
  • 2209

What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? 计算机视觉用于贝叶斯深度学习的不确定性

本博客仅为作者记笔记之用,不对之处,望见谅,欢迎批评指正。 更多相关博客请查阅:http://blog.csdn.net/weixin_39779106; 如需转载,请附上本文链接:htt...
  • weixin_39779106
  • weixin_39779106
  • 2018年01月04日 11:21
  • 99

【Structure and interpretation of Computer Programs 】学习记录兼导言

因为之前买了几本国内的翻译教材,语不达意,极其生涩,读起来比英文还费劲。 所以作死买了一本英文原版,一个forward 哭晕在厕所。N多生词,果然以我六级没过的水平去看这个还是有相当大的难度。 看...
  • gainvr
  • gainvr
  • 2015年08月26日 10:39
  • 134

VMware安装Ubuntu17.04的VMware-tools提示:what is the location of the "ifconfig" program on your machin问题解决

安装VMware-tools最后一步提示:what is the location of the "ifconfig" program on your machine?...
  • ly6cyh
  • ly6cyh
  • 2017年08月07日 11:22
  • 402

What Is Computer?

计算机是什么? 计算机从哪里来? 计算机会走向哪里?
  • Zuocheng_Liu
  • Zuocheng_Liu
  • 2012年01月05日 10:54
  • 539

What is the program?

No programming technique solves all problems.No programming language produces only correct results.N...
  • mtmtwohaoe
  • mtmtwohaoe
  • 2010年03月20日 23:23
  • 79

CodeForces-131A-cAPS lOCK

A. cAPS lOCK time limit per test 2 seconds memory limit per test 256 megabytes inpu...
  • u012188452
  • u012188452
  • 2014年09月08日 09:57
  • 641
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:What is the computer program?
举报原因:
原因补充:

(最多只允许输入30个字)