Слово
«malloc»впервые сказано пользователем
sysdba 09.09.2005 в 12:43,
и с тех пор употреблялось
28 раз.
Сообщения со словом
«malloc»
Запрос выполнился за
0.0032 сек.
- 27.03.2013, 20:12. Silver MC's в теме
«Программирование. Помогите с программой.»
... stdafx h include stdio h include stdlib h include malloc h struct line int n int a int sum struct line l int i j s d i j d s 0 for i 0 i l n i d l a i do s d 10 d 10 while d 0 return s struct line input mat int n int i j struct line pl do printf vvedite kol-vo strokn scanf d n while n 0 для такого цикла n надо сначала проинициализировать n 0 т к по умолчанию там не обязательно лежит 0 if pl struct line malloc n sizeof struct line null return null for i 0 i n i do printf vvedite kol-vo elementov stroki dn i 1 scanf d pl i n while pl i n 0 в этом цикле аналогично элементы массива надо проинициализировать if pl i a int malloc pl i n sizeof int null return null for j 0 j pl i n j printf vvedite d element d ctrokin j 1 i 1 scanf d pl i a j return pl vvivod matr po strokam void print mat struct line pl int n int i j for i 0 i n i for j 0 j pl i n j printf d c pl i a j j 1 pl i n n obrabotka int mat netnol struct line pl int n назначение этой функции я так и не понял по заданию ведь надо чтобы элемент i вектора содержал количество различных элементов в строке i исходного массива int i m if m int malloc n sizeof int null return null for i 0 i n i m i pl i n pl i n return m osvobogdenie pamati void mat free struct line pl int n int i for i 0 i n i free pl i a free pl vivod massiva int print mas int a int n int i for i 0 i n i printf d c a i i 1 n n int main struct line pl int n m printf vvedite matrn pl input mat n if pl null perror malloc return 1 printf isxod matrn print mat pl n m mat netnol pl n if m null perror malloc return 2 printf rezaltn print mas m n system...
- 27.03.2013, 19:28. TheEnt в теме
«Программирование. Помогите с программой.»
... int mat netnol struct line pl int n int i m if m int malloc n sizeof int null return null for i 0 i n i...
- 20.03.2013, 19:45. Thommees в теме
«Программирование. Помогите с программой.»
... stdafx h include stdio h include stdlib h include malloc h struct line int n int a int sum struct line l int i j s d i j d s 0 for i 0 i l n i d l a i do s d 10 d 10 while d 0 return s struct line input mat int n int i j struct line pl do printf vvedite kol-vo strokn scanf d n while n 0 if pl struct line malloc n sizeof struct line null return null for i 0 i n i do printf vvedite kol-vo elementov stroki dn i 1 scanf d pl i n while pl i n 0 if pl i a int malloc pl i n sizeof int null return null for j 0 j pl i n j printf vvedite d element d ctrokin j 1 i 1 scanf d pl i a j return pl vvivod matr po strokam void print mat struct line pl int n int i j for i 0 i n i for j 0 j pl i n j printf d c pl i a j j 1 pl i n n obrabotka int mat netnol struct line pl int n int i m if m int malloc n sizeof int null return null for i 0 i n i m i pl i n pl i n return m osvobogdenie pamati void mat free struct line pl int n int i for i 0 i n i free pl i a free pl vivod massiva int print mas int a int n int i for i 0 i n i printf d c a i i 1 n n int main struct line pl int n m printf vvedite matrn pl input mat n if pl null perror malloc return 1 printf isxod matrn print mat pl n m mat netnol pl n if m null perror malloc return 2 printf rezaltn print mas m n system...
- 20.07.2012, 16:53. mdnt в теме
«The C Programming Language.»
... void push stack stp const int value stack new new malloc sizeof stack new- data value new- nextitem stp...
- 05.10.2011, 21:18. RPG в теме
«Встреча LUG-а в сентябре 2011 (для первокурсников)»
... righten i j k 0 if vert 0 return null else buf tree malloc sizeof tree btree size vert for leften 0 leften vert leften righten vert leften 1 left binarytrees leften right binarytrees righten for i 0 i btree size leften i for j 0 j btree size righten j buf k tree malloc sizeof tree buf k left left left i null buf k right right right j null k return buf int oper c opc int evaltree tree t int a b if t null return ticket c else a evaltree t- left b evaltree t- right return operation oper size-1 opc a b char evaltreeprint tree t char a b buf if t null buf char malloc sizeof char 1 sprintf buf d ticket c c else a evaltreeprint t- left b evaltreeprint t- right buf char malloc sizeof char strlen a strlen b 4 sprintf buf s c s a operations str oper powi ops opc ops b free a free b return buf int main tree trees binarytrees size 1 int max powi ops size 1 int ticket num n i j eval char buf operation int int int malloc sizeof int int int max size-1 for i 0 i max...
- 05.10.2011, 20:26. RPG в теме
«Встреча LUG-а в сентябре 2011 (для первокурсников)»
... зато работает в 2 раза быстрее operation int int int malloc sizeof int int int max size-1 оптимизация луа...
- 28.02.2009, 23:34. Antolflash в теме
«Вопрос: Уровень преподавания математики в МИФИ»
... редактированию списков а здесь надо было тупо выделить память malloc каюсь я зато сейчас понимаю насколько я тупил...
- 23.12.2007, 13:22. Ruben в теме
«Неделя 1. Полный перебор»
... fin exit 0 int n fscanf fin d n n mypair t mypair malloc sizeof mypair n for int z 0 z n z fscanf fin...
- 09.09.2005, 12:43. sysdba в теме
«Считывание файла.»
... calloc globalalloc free globalfree hfree globalfree malloc globalalloc memavl globalmemorystatus memmax...