Welcome![Sign In][Sign Up]
Location:
Search - printf

Search list

[Other resourcech5_MiniPrint

Description: avr下最小化的printf函数,可以输出八进制与十六进制数值。
Platform: | Size: 991 | Author: hot | Hits:

[Windows DevelopformulaC++20080625

Description: 该组件可用编写字符串和数字运算处理脚本,供运行时调用获取执行结果 1、组件调用的方式可以参考 main.cpp 2、脚本的编写可以参考 debug/my.cfg 3、可调用系统函数有 atof: 将字符串转换为浮点数 ceil: floor: abs: index: strcmp: substr: strlen: trim: strstr: split: replace:字符串替换函数 printf: 这些函数基本与同名c函数相同 4、可预先编写一组脚本文件,编译时为每个文件指定ID,供调用时选择
Platform: | Size: 434708 | Author: 范哲伟 | Hits:

[GDI-BitmapCodeGuruEssentialDifferencebetweenCONSOLEandGUIApp

Description: Environment: VC6 Win2K/NT/98 This sample describes the difference between CONSOLE and GUI applications with 20 lines of code. There are 2 small projects in this sample. The first project shows how to create a console in WinMain(). First of all, we need to allocate a console with AllocConsole() secondly, we in turn retrieve the operating system handle (GetStdHandle), run-time handle (_open_osfhandle), stream (_fdopen) and standard stream (stdout) finally, we can call functions like printf() and scanf(). The second project demonstrates how to create a window in main(). I created an edit box in a separate thread, so that you can control this window from the console. I retrieved the module handle through GetModuleHandle(), and then I called CreateWindow with the predefined class name EDIT. As you can see, there is not much essential difference between console and GUI applications, even though VC requires us to indicate the type of the application when you create a project.
Platform: | Size: 205738 | Author: 李峥 | Hits:

[Windows DevelopADDR

Description: 本源码主要应用PRINTF函数和程序地址的访问,属于C方面的高级编程
Platform: | Size: 19030 | Author: walky | Hits:

[Windows Developrprint

Description: 高效地对printf进行了修改,很适合在对串口打印要求速度很高的情况。
Platform: | Size: 4570 | Author: franky | Hits:

[Windows Developprojects

Description: 一个非常简单的printf的源代码
Platform: | Size: 6360 | Author: zhicheng | Hits:

[File Operate字符窗口开发包

Description: 窗口类CBufferWnd:能够作为子窗口或者时弹出窗口支持滚动,自动根据滚动位置调整显示的内容支持光标显示在光标处或是指定位置插入文字输出辅助类CConsoler:与指定的输出窗口对象进行绑定能够支持printf方式的输出能够对汉字进行处理避免出现换行时出现半个汉字的情况,在半个汉字时利用空格进行替换,并在下一行继续显示文字利用字符窗口可以方便的开发类似与控-CBufferWnd window class : to act as sub-window, or when the pop-up window support rolling, rolling under the automatic adjustment position that the content in support of the cursor shows the cursor or a designated location to insert language supporting category CConsoler output : the output window specified targets for bonding to support printf way to the output treatment of Chinese characters to avoid moving there for half of the Chinese characters, half a box of Chinese characters when using Replacement, and the next, and his party continue to show characters using text window can facilitate the development of similar and control
Platform: | Size: 61286 | Author: 杜宇 | Hits:

[Embeded-SCM DevelopPrintppSources

Description: \"printpp\"是帮助用户调试的一个工具,它相当于C提供的printf函数,但它的输出设备是串口。提供的codeworrior编程范例,旨在通过给出的范例使用户对codeworrior的使用有所了解。--A debugging tool. It is equivalent to the \"printf\" in C, but its output device is serial port. The sample code is compiled in codewarrior. By using it, users can be more familiar with codewarrior.
Platform: | Size: 7035 | Author: 小舒 | Hits:

[Other resourceCardTest1

Description: 游戏说明: 牌的大小顺序: 大王,小王,A,K,Q,j,9,8,7,6,5,4,3,2 出牌规则: 每次只能出一张牌,每局开始时随机由其中一人先出牌,以后由上一次赢的玩家出牌。首家可以出任意一张牌。首家出牌后,下家所出的牌的花色要与首家的相同,大小不限。如确实没有花色相同的牌,则可以出其它的牌。 胜负判定: 当每人都出了一张牌后,如果花色相同,则比较两张牌的大小,牌大的赢.如果花色不同,则先出牌的赢。最后经过统计赢的次数最多的 玩家最终赢得比赛。 The rules is following: 1) The Cards RANK (big to small) is: A K Q J 10 9 8 7 6 5 4 3 2 2) Once only can play one Card,if the suit is same and the Rank is big,they win or lost if you no the suit ,you must play any card but your s always small, 3) Now i think you know the rules ! Goog Luck ! printf(\"Please choice your cards Color: 0 means spade 1 means hearts 2 means diamonds 3 means clubs :\\n\") -games : licensing the order : King, Wang, A, K, Q, j, 9,8,7,6,5,4,3,2 out licensing rules : each time out only one card, at the beginning of each Board random by one of the first to be out later last won by the player card. The first to be sent to an arbitrary license. The first card, the home under the license by the first matched with the same open-size. If they really do not matched the same card, can produce other card. The results found : When everyone out of a license, if the same colors, compared to the size of two licenses, the licenses won. If the colors were different, first-out licensing of winning. After winning the final statistics of the number of players up to the final whistle. The rules is following : 1) The Cards RANK (big to small) is : A K Q J 10 9 8 7 6 5 4 3 2 2) Once
Platform: | Size: 4912 | Author: 冰雨 | Hits:

[ELanguageag

Description: 词法分析程序,可对以下的C源程序进行分析:main() {int a[12] ,sum for(i=1 i<=12 i++) {for(j=1 j<=12 j++)scanf(\"%d\",&a[i][j]) } for(i=12 i>=1 i--){ for(j=12 j>=1 j--){ if(i==j&&i+j==13)sum+=a[i][j] } } printf(\"%c\",sum) }-lexical analysis procedures, right below the C source code analysis : main () (int a [12] [12], the sum for (i = 1 ilt; I = 12) (for (j = 1 JLT; J = 12) Scanf ( "% d", a [i] [j])) for (i = 12 IGT; a = i --) (for (j = 12 IGT; = 1 j --) (if (i == ji j == 13) sum = a [i] [j])) printf ( "% c", sum
Platform: | Size: 1382 | Author: 范铮 | Hits:

[CSharp优美C语言(3)

Description: 3. 源程序要正确地运行,必须要有什么函数?(单选) A. printf函数 B. 自定义的函数 C. main函数 D. 不需要函数 答案: C-3. Source code to run correctly, we must have what function (Option) A. B. printf function defined function main function D. C. function need not answer : C
Platform: | Size: 15241 | Author: gjc | Hits:

[WEB Codec语言教程(www.vcok.com版)

Description: 经典c程序100例==1--10 【程序1】 题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 1.程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去       掉不满足条件的排列。 2.程序源代码: main() { int i,j,k printf(\"\\n\") for(i=1 i<5 i++)    /*以下为三重循环*/  for(j=1 j<5 j++)    for (k=1 k<5 k++)    {     if (i!=k&&i!=j&&j!=k)    /*确保i、j、k三位互不相同*/     printf(\"%d,%d,%d\\n\",i,j,k)    }-classic procedures hundred cases == 1 -- 10 procedures -- a topic : 1,2,3,4 figures, the number can be formed with each other with no repeat of the triple-digit figures? How many are? 1. Program Analysis : can fill the 100, 10, 000 the number of spaces are 1,2,3,4. With all the components removed after not satisfied with the conditions. 2. Source code : main () (int i, j, k printf ( "\\ n") for (i = 1 ilt; 5 i) / * the following as the triple cycle * / for (j = 1 JLT; 5 j) for (k = 1 KLT; 5 k) (if (i! = ki! = jj! = k) / * i, j, k three disparate * / printf ( "% d,% d,% d \\ n ", i, j, k
Platform: | Size: 304386 | Author: 刘宋 | Hits:

[Other resourceC++完美演绎2

Description: C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf(\"由小至大排序之后的结果:%d %d %d\\n\", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264-C perfect interpretation of classic algorithms / * header files : my_Include.h * / # include lt; Stdio.hgt; / * Start with the built-in C language function instructions * / # define PI 3.1415926 / * Acer constants later, in another chapter Elaborates on * / # define circle (radius) (PI * * radius radius) / * Macro function, a round of the area * / / * to compare the numerical size of the write functions include writing paper * / int show_big_or_small (int a, b int, int c) (int tmp if (Agt; b) (tmp = a b a = b = tmp) if (BGT; c) (tmp = b b = c c = tmp) if (Agt; b) ( tmp = a b a = b = tmp) printf ( "ascending order by the following results :% d% d% d \\ n", a, b, c)) procedures : in ascending order by the following results : 1 2 3 will the built-in functions include documents writte
Platform: | Size: 130555 | Author: 立功 | Hits:

[Static controler

Description: Java 天生的一些优势外,他最大的魅力在於它提供的应用程式程式设 计介面 (API, Application Programming Interface),什麼是 API 呢 所谓 API 是指作业环境所提供给程式设计者用来使唤系统,程式库或是元件的函式 呼叫或资料结构,换言之,就是作业系统或作业环境提供给应用程式与系 统核心沟通的介面,像:ANSI C 中规定的 printf 就是用来向标准输出输出 文字用的函数呼叫.所以,只要知道 Java 提供了哪些类别可供使用,就可 以轻易的设计 Java 程式.-Java born some advantage, his greatest charm is that it provides applications programming interface (API Application Programming Interface) and what is so-called? API API is provided by the operating environment to the programs used to manage system designers, programmers or components for the call or data abstraction the structure, in other words, is the operating system or operating environment for application programs to communicate with the core system, the interface as : ANSI C is the printf to output to standard output using the text function call. Therefore, as long as the Java know what types available, it can light the easy design of Java programs.
Platform: | Size: 7879 | Author: zc | Hits:

[CSharp魔方阵的问题求解

Description:

#include"stdio.h"
#include"stdlib.h"

int main()
{ int i ,j,a[100][100],n,k,flag=1;

while(scanf("%d",&n)!=EOF&&(n%2!=0))
{
for(i=0;i<n;i++)
for(j=0;j<n;j++)
a[i][j]=0;
j=n/2;
a[0][j]=1;
i=0;
for(k=2;k<=n*n;k++)
{
i=i-1;
j=j+1;
if((i<0)&&(j>n-1))
{
i=i+2;
j=j-1;
}
else
{
if(i<0)
i=n-1;
else
{
if(j>n-1)
j=0;
}
}
if(a[i][j]==0)
a[i][j]=k;
else
{
i=i+2;
j=j-1;
a[i][j]=k;
}
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
printf("%d ",a[i][j]);
printf("\n");
}
}
system("pause");
return 0;
}
 


Platform: | Size: 595 | Author: gdcjh12 | Hits:

[Mathimatics-Numerical algorithms约瑟夫

Description: #include void main() { int i,j,k,a[31],n=0; for(i=0;i<=30;i++) a[i]=0; k=1; for(i=1;i30) k=1; } a[k++]=1; if(k>30) k=1; //n++; } printf("%d\n",k); for(i=1;i<=30;i++) printf("%d ",a[i]); printf("(1为非*,0为*)"); }
Platform: | Size: 6406 | Author: man001 | Hits:

[Windows Develop征服4.0马端源码

Description: using System; using System.Collections.Generic; using System.Text; namespace NewestCOServer { public class Cryption { class CryptCounter { UInt16 m_Counter = 0; public byte Key2 { get { return (byte)(m_Counter >> 8); } } public byte Key1 { get { return (byte)(m_Counter & 0xFF); } } public void Increment() { m_Counter++; } } private CryptCounter _decryptCounter; private CryptCounter _encryptCounter; private byte[] _cryptKey1; private byte[] _cryptKey2; private byte[] _cryptKey3; private byte[] _cryptKey4; private bool Decrypt2 = false; public Cryption() { _decryptCounter = new CryptCounter(); _encryptCounter = new CryptCounter(); _cryptKey1 = new byte[0x100]; _cryptKey2 = new byte[0x100]; byte i_key1 = 0x9D; byte i_key2 = 0x62; for (int i = 0; i 4 | buffer[i] < 4 | buffer[i] < 4 | buffer[i] << 4); buffer[i] ^= (byte)(_cryptKey4[_decryptCounter.Key2] ^ _cryptKey3[_decryptCounter.Key1]); _decryptCounter.Increment(); } } } public void GenerateKeys(UInt32 CryptoKey, UInt32 AccountID) { UInt32 tmpkey1 = 0, tmpkey2 = 0; tmpkey1 = ((CryptoKey + AccountID) ^ (0x4321)) ^ CryptoKey; tmpkey2 = tmpkey1 * tmpkey1; _cryptKey3 = new byte[256]; _cryptKey4 = new byte[256]; for (int i = 0; i < 256; i++) { int right = ((3 - (i % 4)) * 8); int left = ((i % 4)) * 8 + right; _cryptKey3[i] = (byte)(_cryptKey1[i] ^ tmpkey1 left); _cryptKey4[i] = (byte)(_cryptKey2[i] ^ tmpkey2 left); } Decrypt2 = true; } public void GenerateKeys2(byte[] InKey1, byte[] InKey2) { byte[] addKey1 = new byte[4]; byte[] addKey2 = new byte[4]; byte[] addResult = new byte[4]; //addKey1.i = 0; //addKey2.i = 0; byte[] tempKey = new byte[4]; long LMULer; // InKey1[0] = 0x20; // InKey1[1] = 0x5c; // InKey1[2] = 0x48; // InKey1[3] = 0xf4; // InKey2[0] = 0x00; // InKey2[1] = 0x44; // InKey2[2] = 0xa6; // InKey2[3] = 0x2e; //if (Key3) delete [] Key3; //if (Key4) delete [] Key4; _cryptKey3 = new byte[256]; _cryptKey4 = new byte[256]; for (int x = 0; x < 4; x++) { addKey1[x] = InKey1[3 - x]; addKey2[x] = InKey2[3 - x]; } //cout << "Key1: " << addKey1.i << endl; //cout << "Key2: " << addKey2.i << endl; uint Adder1; uint Adder2; uint Adder3; Adder1 = (uint)((addKey1[3] << 24) | (addKey1[2] << 16) | (addKey1[1] << 8) | (addKey1[0])); Adder2 = (uint)((addKey2[3] << 24) | (addKey2[2] << 16) | (addKey2[1] 8) & 0xff); addResult[2] = (byte)((Adder3 >> 16) & 0xff); addResult[3] = (byte)((Adder3 >> 24) & 0xff); for (int b = 3; b >= 0; b--) { // printf("%.2x ", addResult.c[b]); tempKey[3 - b] = addResult[b]; } tempKey[2] = (byte)(tempKey[2] ^ (byte)0x43); tempKey[3] = (byte)(tempKey[3] ^ (byte)0x21); for (int b = 0; b < 4; b++) { tempKey[b] = (byte)(tempKey[b] ^ InKey1[b]); } //Build the 3rd Key for (int b = 0; b < 256; b++) { _cryptKey3[b] = (byte)(tempKey[3 - (b % 4)] ^ _cryptKey1[b]); } for (int x = 0; x < 4; x++) { addResult[x] = tempKey[3 - x]; } Adder3 = (uint)((addResult[3] << 24) | (addResult[2] << 16) | (addResult[1] << 8) | (addResult[0])); LMULer = Adder3 * Adder3; LMULer = LMULer 32; Adder3 = Convert.ToUInt32(LMULer & 0xffffffff); addResult[0] = (byte)(Adder3 & 0xff); addResult[1] = (byte)((Adder3 >> 8) & 0xff); addResult[2] = (byte)((Adder3 >> 16) & 0xff); addResult[3] = (byte)((Adder3 >> 24) & 0xff); for (int b = 3; b >= 0; b--) { tempKey[3 - b] = addResult[b]; } //Build the 4th Key for (int b = 0; b < 256; b++) { _cryptKey4[b] = Convert.ToByte(tempKey[3 - (b % 4)] ^ _cryptKey2[b]); } Decrypt2 = true; //cout << "Int representation: " << charadd.i << endl; } } }
Platform: | Size: 3638778 | Author: andesion@vip.qq.com | Hits:

[Linux-UnixDebian Etch MIPS image for QEMU

Description:

What is it?

A generic stand-alone MIPS program that can do printf on a standard UART.

requirements:

. CPU has CP0 structure (r4k compatible)

Configure:
 

--------------Debian Etch MIPS image for QEMU
-

 


Platform: | Size: 6694 | Author: dtqaz123 | Hits:

[Internet-Network一个判断远程主机存活程序代码

Description: 一个判断远程主机存活程序代码(ping) #include #include #include #include #include "winsock.h" #pragma comment(lib,"Ws2_32"); #define SEND_SIZE 32 #define PACKET_SIZE 4096 #define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 struct icmp { unsigned char icmp_type; unsigned char icmp_code; unsigned short icmp_cksum; unsigned short icmp_id; unsigned short icmp_seq; unsigned long icmp_data; }; struct ip { unsigned char ip_hl:4; unsigned char ip_v:4; unsigned char ip_tos; unsigned short ip_len; unsigned short ip_id; unsigned short ip_off; unsigned char ip_ttl; unsigned char ip_p; unsigned short ip_sum; unsigned long ip_src; unsigned long ip_dst; }; unsigned char sendpacket[PACKET_SIZE]; unsigned char recvpacket[PACKET_SIZE]; struct sockaddr_in dest_addr; struct sockaddr_in from_addr; int sockfd; int pid; unsigned short cal_chksum(unsigned short *addr,int len); int pack(int pack_no); int unpack(unsigned char *buf,int len); void send_packet(void); void recv_packet(void); void main(int argc,char *argv[]) { struct hostent *host; struct protoent *protocol; WSADATA wsaData; int timeout=1000; int SEND_COUNT=4; int i; char *par_host; par_host=argv[argc-1]; //IP赋值 switch(argc) { case 2: break; case 3: if(strcmp(argv[1],"-t")==0) { SEND_COUNT=10000; break; } //fall through default: printf("usage: %s [-t] Host name or IP address\n",argv[0]); exit(1); } if(WSAStartup(0x1010,&wsaData)!=0) { printf("wsastartup error\n"); exit(1); } if( (protocol=getprotobyname("icmp") )==NULL) { printf("getprotobyname error\n"); exit(1); } /* printf("%s\n",protocol->p_name); printf("%s\n",protocol->p_aliases); printf("%d\n",protocol->p_proto); system("pause"); */ if( (sockfd=socket(AF_INET,SOCK_RAW,protocol->p_proto) )<0) { printf("socket error\n"); exit(1); } if(setsockopt(sockfd,SOL_SOCKET,SO_RCVTIMEO,(char*)&timeout,sizeof(timeout))h_length); //resolve address to hostname if(host=gethostbyaddr(host->h_addr,4,PF_INET)) par_host=host->h_name; // //printf("%s\n",par_host); // } else if( dest_addr.sin_addr.s_addr=inet_addr(par_host)==INADDR_NONE) { printf("Unkown host %s\n",par_host); exit(1); } pid=getpid(); /* printf("%d\n",pid); system("pause"); */ printf("Pinging %s [%s]: with %d bytes of data:\n\n",par_host,inet_ntoa(dest_addr.sin_addr),SEND_SIZE); for(i=0;i1) { sum+=*w++; nleft-=2; } if( nleft==1) { *(unsigned char *)(&answer)=*(unsigned char *)w; sum+=answer; } sum=(sum>>16)+(sum&0xffff); sum+=(sum>>16); answer=~sum; return answer; } //打包 int pack(int pack_no) { int packsize; struct icmp *icmp; packsize=8+SEND_SIZE; icmp=(struct icmp*)sendpacket; icmp->icmp_type=ICMP_ECHO; icmp->icmp_code=0; icmp->icmp_cksum=0; icmp->icmp_seq=pack_no; icmp->icmp_id=pid; icmp->icmp_data=GetTickCount(); icmp->icmp_cksum=cal_chksum( (unsigned short *)icmp,packsize); /*校验算法*/ return packsize; } //解包 int unpack(unsigned char *buf,int len) { struct ip *ip; struct icmp *icmp; double rtt; int iphdrlen; ip=(struct ip *)buf; iphdrlen=ip->ip_hl*4; icmp=(struct icmp *)(buf+iphdrlen); if( (icmp->icmp_type==ICMP_ECHOREPLY) && (icmp->icmp_id==pid) ) { len=len-iphdrlen-8; rtt=GetTickCount()-icmp->icmp_data; printf("Reply from %s: bytes=%d time=%.0fms TTL=%d icmp_seq=%u\n", inet_ntoa(from_addr.sin_addr), len, rtt, ip->ip_ttl, icmp->icmp_seq); return 1; } return 0; } //发送 void send_packet() { int packetsize; static int pack_no=0; packetsize=pack(pack_no++); if( sendto(sockfd,(char *)sendpacket,packetsize,0,(struct sockaddr *)&dest_addr,sizeof(dest_addr) )=0) success=unpack(recvpacket,n); else if (WSAGetLastError() == WSAETIMEDOUT) { printf("Request timed out.\n"); return; } }while(!success); } UID5380 帖子239 精华0 积分1289 阅读权限40 来自软件学院 在线时间81 小时 注册时间2006-5-22 最后登录2007-2-24 查看详细资料 TOP
Platform: | Size: 5881 | Author: shuiyuan313 | Hits:

[SourceCode文件剪切

Description: 设置起始地址,文件大小,名字,就可以剪切出想要的Bin文件的某个部分 printf(" filecut \r\n"); printf("\r\n"); printf(" /address : File Offset\r\n"); printf("\r\n"); printf(" /sizeof : File size\r\n");
Platform: | Size: 943 | Author: sean_xu_rc@126.com | Hits:
« 1 2 ... 4 5 6 7 8 910 11 12 13 14 ... 38 »

CodeBus www.codebus.net