Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void monitor(int *p);
- ///////////////////////////////////
- int main() //
- {
- int nArr[20] = {21, 7, 11, 88, 44, 92, 3};
- monitor(nArr);
- monitor(nArr);
- }
- /////////////////////////////////////////////////////////
- void monitor(int *p)
- {
- for(int i = 0; i < 7; i++)
- {
- printf("%d, ", p[i]);
- }
- }
- #include <stdio.h>
- #include <stdlib.h>
- int n = 88;
- ///////////////////////////////////
- int main() //
- {
- int n2 = 23;
- int *p = malloc(4);
- *p = 123;
- printf("*p = %d", *p);
- }
- /*
- #include <stdio.h>
- #include <string.h>
- int strlent_test();
- int n,
- *p = &n;
- ///////////////////////////////////
- int main() //
- {
- char str[99] = "SONY Pictures";
- int s = strlent_test(str);
- printf("s = %d", s);
- return 0;
- }
- /////////////////////////////////// '\0' != 0
- int strlent_test(const char *y) //
- {
- int n = 0;
- while( y[++n] );
- return n;
- }
- */
- /*
- ///////////////////////////////////
- int strlent_test(const char* y) //
- {
- int n = 0;
- while(*y != '\0')
- {
- y ++;
- n ++;
- }
- return n;
- }
- */
- /*
- #include <stdio.h>
- #include <stdlib.h>
- int n = 9;
- ////////////////////////////////////////////////////
- int main() //
- {
- int n1 = 55;
- int *p = malloc(sizeof(int));
- *p = 777;
- printf(" p = %d \n", p);
- printf("*p = %d \n", *p);
- }
- */
- /*
- #include <stdio.h>
- unsigned __int16 n = 65530;
- ////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 65530; i < 65550; i++)
- {
- printf("%4d ", n); n = n + 1;
- }
- }
- */
- /*
- #include <stdio.h>
- unsigned char n = 240;
- ////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 240; i < 280; i++)
- {
- printf("%4d ", n); n = n + 1;
- }
- printf("\n %4d ", sizeof(unsigned char));
- }
- */
- /*
- #include <stdio.h>
- unsigned char n = 100;
- char n2 = 100;
- ////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 100; i < 160; i++)
- {
- printf("%4d ", n); n = n + 1;
- }
- printf("- - - - - - \n");
- for(int i = 100; i < 160; i++)
- {
- printf("%4d ", n2); n2 += 1;
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement