Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <iostream>
- using namespace std;
- int _strlen(char *p);
- /////////////////////////////////////////////////////////
- int main()
- {
- char sz[99] = "SONY Pictures";
- int n1 = _strlen(sz);
- int n = strlen(sz);
- cout << "strlen returned = " << n1 << endl;
- }
- //////////////////////////////////////////////////////////
- int _strlen(char *p)
- {
- int n = 10;
- printf("p = %c\n", *p);
- printf("p = %d\n", *p);
- cout << p << endl;
- return n;
- }
- /*
- #include <iostream>
- using namespace std;
- void mult(int n2);
- /////////////////////////////////////////////////////////
- int main()
- {
- for(int n = 2; n < 11; n+=1) mult(n);
- }
- /////////////////////////////////////////////////////////
- void mult(int n2)
- {
- int i = 2;
- L_01: cout << n2 << " * " << i
- << " = " << n2 * i << endl;
- i ++;
- if( i < 11) goto L_01;
- cout << " - - - - - - - \n";
- }
- */
- /*
- #include <stdio.h>
- void mult(int n2);
- /////////////////////////////////////////////////////////
- int main()
- {
- for(int n = 2; n < 11; n+=1) mult(n);
- }
- /////////////////////////////////////////////////////////
- void mult(int n2)
- {
- int i = 2;
- L_01: printf("%d * %2d = %3d\n", n2, i, n2 * i);
- i ++;
- if( i < 11) goto L_01;
- printf(" - - - - - - - \n");
- }
- */
- /*
- #include <stdio.h>
- void mult(int n2);
- /////////////////////////////////////////////////////////
- int main()
- {
- for(int n = 2; n < 11; n+=1) mult(n);
- }
- /////////////////////////////////////////////////////////
- void mult(int n2)
- {
- for(int i = 2; i < 11; i++)
- {
- printf("%d * %2d = %3d\n", n2, i, n2 * i);
- }
- printf(" - - - - - - - \n");
- }
- */
- /*
- #include <iostream>
- using namespace std;
- /////////////////////////////////////////////////////////
- int main()
- {
- setlocale(LC_ALL, "rus");
- cout << "Привет - Hello !" << endl;
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement