Program 31 "
Question: Please enter the first letter of the week to determine the day of the week, and if the first letter is the same, continue to judge the second letter.
1. Procedure analysis: Use the situation statement is better, if the first
"Program 21"
Topic: Monkey Eat Peach problem: The first day the monkey picked a number of peaches, immediately ate half, still not addicted, and eat one more, the next morning and the remaining peaches eat half, and eat one more. Every morning
"Program 11"
Title: Classical question: There are a pair of rabbits, from the 3rd month after the birth of a pair of rabbits each month, the rabbit long to the third month after the birth of a pair of rabbits each month, if the rabbit is not dead,
To learn a small example today, use the C language to display a 0-360-degree cosine function cos (x) curve with "*" on the screen.
Simulation Method:
#include #include int main (void)... { Double i; int j,k; for (i=1.0; i>=-0.4; I-=0.1)
Interview often encounter problems, C language implementation string reverse. such as input "ABCD", Output "DCBA".
Recently tidied up, the following code has been tested.
#define Max 200 main() { char str[Max]; printf("请输入字符串:"); gets(str)
Like PHP and Perl, MySQL also provides the API used by the C language.
The API for C code is published with MySQL. It is included in the Mysqlclient library and enables the C program to access the database.
Many of the clients in the MySQL source
Some time ago, prepare to design a table about error information, each error has a unique Errid, and the corresponding error message and other auxiliary information. In the C language, it is natural to achieve the following:
enum { Err_id_1,
1. Environmental
/usr/local/apache/htdocs/(Files to be retrieved are in this directory)
/usr/local/apache/temp/(as a transit folder)
/usr/local/apache/cgi-bin/
2. Place the a.out produced by GCC search.c in/usr/local/apache/cgi-bin/and the
I've always felt that printf seems to be one of the most powerful functions in the C language library, not only because it can format output, but because it has no limits on the number of parameters, and a few to give. printf's strong adaptability
A program that deletes substrings without using the related string library function of C:
#include int Del_substr (char *str,char const *SUBSTR);int My_strlen (char const *STR);int main (void){Char str[] = "ABCDEFGH";Char *substr1 = "EFG";Char
int testA (void) { int b = 1 ; return b; } char * testB (void) { char str[] = "abc" ; return str; } int main() { printf( " the value of testA is %d \n", testA() ); printf( " the value of testB is %c ", *( testB() )
Write a program: Enter a string from the keyboard, convert all lowercase letters to uppercase letters, and save the output to the disk file "Upper.txt". Enter the string to "! End The contents of the file Upper.txt are then read out and displayed on
I am using Sshsecureshellclient-3[1].2.9.exe for Linux C programming on Windows XP-SP2, let's talk about how to use this software first:
Install Sshsecureshellclient-3[1].2.9.exe locally, create a username and password on the server, and then open
Previously published "6 Abnormal C language Hello World program" [Cool shell link] [csdn link], mainly is like everybody shows some C language of abnormal play. Also showed that the program can be written so that people do not understand, in that
A Problems with fonts in the C language
There are two ways of displaying in C language, that is, text mode and graphic mode. As I know, fonts can only be controlled in graphic mode.
Let's take a look at some of the fonts defined in C
Name index
The following example defines two structures, and because of the existence of strings in the member, the struct uses a character array, while struct two uses a character pointer.
#include #define LEN 20 struct info { char first[LEN]; char
An application example of indefinite parameter in C language: indefinite parameters as a special skill of the middle-C + + language was praised by many people, but in fact this technology has not been applied much. I don't see much application
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.