Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- //////////////////////////////////////////////////
- struct Auto //
- {
- int nWhile,
- nPeoples;
- char szName[123];
- };
- void foo(Auto *jhghjghjghjgjhghjgjhgjhg);
- //////////////////////////////////////////////////
- int main() //
- {
- Auto Car1, MyCar, Truck;
- foo(&Truck);
- printf("%s ", Truck.szName);
- printf("%d", Truck.nWhile);
- }
- ///////////////////////////////////////////////////
- void foo(Auto *p) //
- {
- strcpy(p->szName, "Man");
- p->nWhile = 16;
- }
- /*
- #include <stdio.h>
- #include <string.h>
- //////////////////////////////////////////////////
- struct Auto //
- {
- int nWhile,
- nPeoples;
- char szName[123];
- };
- //////////////////////////////////////////////////
- int main() //
- {
- Auto Car1, MyCar, Truck;
- Truck.nWhile = 8;
- strcpy(Truck.szName, "Mersedes");
- printf("%s", Truck.szName);
- printf("%d", Truck.nWhile);
- }
- */
- /*
- #include <stdio.h>
- int arr[91] = { 28, 6, 999, 17, 100, 4, 8, 2, 10, 58, 3, 598 };
- void _sorting(int *arr, int size);
- //////////////////////////////////////////////////
- int main() //
- {
- _sorting(&arr[0], 12);
- for(int i = 0; i < 12; i++)
- {
- printf("%d, ", arr[i] );
- }
- }
- //////////////////////////////////////////////////
- void _sorting(int *arr, int size) //
- {
- int step = size - 1,
- nBuf ;
- while(step > 0)
- {
- for(int i = 0; i + step < size; i++)
- {
- if(arr[i] > arr[i+step])
- {
- nBuf = arr[i];
- arr[i] = arr[i+step];
- arr[i+step] = nBuf;
- }
- }
- step = step/1.2473309;
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement