????4. ???????????(C99)
??????
????void f(int a[static 10]) {
????/* ... */
????}
?????У????????????????????f ???????????????????10??int ????????????????????????????????????磬????????????a ??????????????????????????????????????null??????????????????С??????????檔
??????
????void f(int a[const]) {
????/* ... */
????}
??????????????a.??????????int * const a.??????????????????????????????????static ??????????int a[static const 10] ?У?????????Щ?????????????????????
????5. ?????????C11??
??????????????????????????????????????????????????????????????????????????????????????????????????У?
????#define cbrt(X) _Generic((X)??
????long double: cbrtl??
????default: cbrt??
????float: cbrtf
????)(X)
???????????expr ??long double?????? cbrt(expr) ??????cbrtl(expr)???????float???? ??????cbrtf(expr) ??????????cbrt(expr)??????????????????????????double ???????_Generic ???????????????????????????????????C??????????к????????
????6. wint_t ??C99??
????????????????wint_t ???? wint_t ?????????????????
?????e?????fgetc ???????????? char ????????int????????????fgetc ??????????????????char ?????????????EOF?????????????β??????????????fgetwc ????????wchar_t????????????????????wint_t ????????????Чwchar_t ?????????WEOF???????????????β??
????Michal Fori?ek
???????????C?????????????2??747?η?????????????????????
????????
????#include <stdio.h>
????#include <math.h>
????int main() {
????printf("%.0f "??pow(2??747));
????return 0;
????}
????????????????7402983151916069675202271883308899666103773198684199386306057157640700114662060195593254131453735723259390500531821

59998975553533608824916574615132828322000124194610605645134711392062011527273571616649243219599128195212771328
????????
???????????????????????
?????????2??η???????double ?б????????????????κξ?????????????????????2^1023????????????????????磬????????????????
???????????????????2???????????е??Щ??????????μ??????????????????????????????????????2?????η??????????????????????????????????????????????????????????á????????printf ??????????κ???????????????????????????????????????????????????????????????printf ???????????????????????????????????C?в???д????????????????gcc??????У?vfprintf.c ??dtoa.c ?а?????????????????????????????????
?????????????3^474??
????????
????#include <stdio.h>
????#include <math.h>
????int main() {
????printf("%.0f "??pow(3??474));
????return 0;
????}
????????????????1430456768828466115327897475231203158390125920371120164772500692433310663451919482330309133027768477654716709315

5518867557708479462413116497799842448027156309852771422896137582164841870381535840058702788340257784498862132559872
???????????????????????λ???????????????????????????????????????????????3^474?????????????????????????????????????????143045676882846603471…
???????????linux?????????????windows 64λ???????к??0
????Utkal Sinha
??????????ЩC?????????????С????????????к???????????
????1. ????ü????????????
???????printf() ?????????????????????????????????????????????????????????????£?
#include<stdio.h>;
int add(int a??int b){
if(if(a!=0&&b!=0))
return printf("%*c%*c"??a??' '??b??' ');
else return a!=0?a:b;
}
int main(){
int A = 0?? B = 0;
printf("Enter the two numbers to add ");
scanf("%d %d"??&A??&B);
printf("Required sum is %d"??add(A??B));
return 0;
}
????????λ??????????????????
????int Add(int x?? int y)
????{
????if (y == 0)
????return x;
????else
????return Add( x ^ y?? (x & y) << 1);
????}
????2. ????????????÷?
???????????????????????
????x = (y < 0) ? 10 : 20;
???????????????????????
????(y < 0 ? x : y) = 20;
????3. ???????????void ???????д???return ???
????static void foo (void) { }
????static void bar (void) {
????return foo();
????// ??????????????.
????}
????int main (void) {
????bar();
????return 0;
????}
????4. ????????????
????????????????????????
????for (int i=0; i<10; i++?? doSomethingElse())
????{
????/* whatever */
????}
????????????????????κε?????????????
????1
????int j = (printf("Assigning variable j ")?? getValueFromSomewhere());
????????????????????????????????????????????
????5. ???????????0
????struct mystruct a = {0};
????????????????????????0
????6. ?????????
????int x = 'ABCD';
????????x????????0×41424344??????0×44434241???????????
????7. printf ???????????????????????????????
????#include <stdio.h>
????int main() {
????int a = 3;
????float b = 6.412355;
????printf("%.*f "??a??b);
????return 0;
????}
????* ??????????????
?????????Щ????????????
???????????
????Vivek Nagarajan
????????????????????#include
?????????д??
????#include <stdio.h>
????void main()
????{
????printf
????#include "fragment.c"
????}
??????fragment.c ??????
????("dayum! ");
??????????????????#include ???????????????C?????????????????????????????λ?á?
????Vipul Mehta
????1. printf ???????????????POSIX???????
????printf("%4$d %3$d %2$d %1$d"?? 1?? 2?? 3?? 9); //??????9 3 2 1
????2. ??scanf ?к???????????
????scanf("%*d%d"?? &a);// ???????1 2?????????2
????3. ??switch ????÷?Χ??gcc???????
????switch(c) {
????case 'A' ... 'Z':
????//do something
????break;
????case 1 ... 5 :
????//do something
????}
????4. ?????ob ????????????????????????????gcc???????
????printf("%d"??0b1101);
????// prints 13
????5.??????????C???????
????main;
???????????????????error????????????
????Karan Bansal
????scanf()??????
????????????????????char a[100]
?????????????????
????scanf("%[^ ] "?? a);//???????????????' '??????????' '
????????????????????????
????scanf("%[^??]"?? a);//??????β?????????
???????????????????????????% ?????*?????????????John Smith ????:
????scanf("%s %s"?? temp?? last_name);
????//????????????????????
????scanf("%s"?? last_name);
????scanf("%s"?? last_name);
????// ????????????????????????????? `scanf()`
????scanf("%*s %s"?? last);
????//????????????????????????????????`scanf()`
????????????????÷??С??????scanf ?????????????????????????????????????fgets ??sscanf ????????????scanf?????fgets ???????У??????sscanf ??????????У?????????????????
????Afif Ahmed
????~-n ????n-1
????-~n ????n+1
???????
??????????д-n?????????????????????棬????-n ????д??~n + 1????????????????????????????????????????