易截截图软件、单文件、免安装、纯绿色、仅160KB

两个矩阵相乘并输出的C程序

[root@ocsser file]# cat array-05.c
//this is a program for two juzheng xiangcheng.
#include <stdio.h>
int main(){
        int i,j,m,n;
        int g,k,f;
        int c[5][6];
        int a[5][4]={1,5,7,3,
                3,6,3,9,
                1,2,8,7,
                0,3,1,9,
                3,2,5,4 };
        int b[4][6]={3,9,1,4,1,4,
                5,6,7,9,0,3,
                3,2,7,2,5,6,
                9,7,4,7,8,0};
        printf("---------------------------\n");
        printf("array a as following:\n");
        for(i=0;i<4;i++){
                printf("\n");
                for (j=0;j<5;j++)
                        printf("%d ",a[i][j]);
        }
        printf("\n---------------------------\n");
        printf("


相关文档:

C中读取数组

#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 100
main()
{
FILE *fp;
if ( (fp = fopen( "c:\\a.txt", "r" )) == NULL ) printf("ERROR!\n");
int tmp[MAXSIZE];
int i;
for ( i=0; i<MAXSIZE; i++ )
{
tmp[i] = 0; ......

职工工资管理系统(我的第一个C程序)


#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
#include<windows.h>
#include<malloc.h>
#include<math.h>
typedef struct worker

 int num; //编号
 char name[15]; //姓名
 char zhicheng[15];& ......

C程序使用不同函数调用约定调用汇编子过程

如转载,请注明出处:http://blog.csdn.net/zhangyang0402/archive/2010/05/01/5549266.aspx
 
开发工具:VC ++ 6.0  MASM32
 
一、__cdecl调用方式
 
1.  在VC中新建Win32 Console Application, TestASM
 
2.  新建test.c
#include<stdio.h>
extern void swap(int * ......

c输入输出


格式输出:
printf(格式控制, 输出表列);
%d 十进制数  %md m为指定的宽度 若数据位数小于m,则左端补以空格;若大于m,则按实际位数输出
%ld 长整型数据  %mld 指定字段宽度
%o 八进制整数形式  %mo
%x 十六进制整数形式  %mx
%u unsigned型数据,它也可用%o或%x格式输出
%c 一个字符   ......

c/c++类型

1.分类
 内部类型 和用户定义类型
2.
 整形:bool ,字符型,整形
   true  1                   flase 0
   非零 true              & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号