Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- ////////////////////////////////////////
- int main()
- {
- char sz[9];
- int n = 142;
- printf("n = %d", n);
- }
- /*
- #include <stdio.h>
- ////////////////////////////////////////
- int main()
- {
- char sz[9];
- int n = 142;
- sprintf(sz, "%d", n);
- printf("n = %s", sz);
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////
- int main()
- {
- char sz[9];
- int n = 142;
- printf("%d\n", n%10);
- n = n / 10;
- printf("n = %d\n", n);
- printf("%d\n", n%10);
- n = n / 10;
- printf("n = %d\n", n);
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////
- int main()
- {
- char sz[9];
- int n = 142;
- for(int i = 2; i >= 0; i--)
- {
- sz[i] = (n % 10) + 48;
- n /= 10;
- }
- sz[3] = 0;
- printf("n=%s", sz);
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////
- int main()
- {
- char sz[9];
- int n = 142;
- char b = 53;
- char v = 51; //'4'; // '1';
- char c = 56; //'2';
- sz[0] = b;
- sz[1] = v;
- sz[2] = c;
- sz[3] = 0;
- printf("n=%s", sz);
- }
- */
- /*
- #include <stdio.h>
- int main()
- {
- int array[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };
- int b = 10,
- v = 0;
- for (int i = 0; i < 20; i++)
- {
- if (array[i]<b)
- {
- v++;
- }
- }
- printf("%d\n", v);
- }
- */
- /*
- #include <stdio.h>
- #include <string.h>
- char sz[7]; // = 48
- ///////////////////////////////////////////////////
- int main()
- {
- int n = 142;
- c = c + n;
- // memcpy(&c,&n,4) ;
- printf("n = %s", sz);
- }
- */
- /*
- #include <stdio.h>
- #include <string.h>
- int c;
- int main()
- {
- int n = 4;
- memcpy(&c,&n,4) ;
- printf("n = %c", &c);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement