Belépés címtáras azonosítással
magyar nyelvű adatlap
angol nyelvű adatlap
Programming
A tantárgy neve magyarul / Name of the subject in Hungarian: Programozás
Last updated: 2019. május 17.
BME Faculty of Natural Sciences
BSc in Phisics Program
Zsolt Kohári
Assistant researcher
Department of Electron Devices
Dr. László Pohl
Associate professor
A fenti forma a Neptun sajátja, ezen technikai okokból nem változtattunk.
A kötelező előtanulmányi rend az adott szak honlapján és képzési programjában található.
Week 1: synopsys of the subject, requirements, algorithm, data, language, programming languages, why the C? specification, design, coding, testing, documenting, algorithm choice questions in connection with GCD (trial and error, prime factors, Euclidean formula), elements of algorithms: sequence, branching, cycles, n! calculation:- algorithm selection, parts, data structure,- narrative description of the algorithm- algorithm by block diagram- encodinga small analysis: mandatory elements of a C program, the frame, the main function, return 0the purpose and significance of indenting, scanf for reading integer values, printf for writing integer values.
Week 2: storage units: variables, constants, functionsmandatory declaration / definition, syntax / semantics: Syntax diagram, syntax of an integer value, Basic syntax rules: free writing mode (white spaces), a != A, #preproc, / * comment * /, regular identifierspredefined types, why we use int and double, constant int definition in dec, oct, hex forms, lack of the logic type, logic value of numbersInstructions: ;, declaration/definition, expression instruction, conditional instruction, cycle (now just the while), control statements (switch/case just mentioned), {}, block diagram of if..else and while, Conditions- relational operators ('==' != '=', the dangers)- logic operators !, &&, ||
Week 3: supplement and deepen the knowledge of the past week. control structures, instructions, built-in types, number representation.Use of library functions
Week 4: Basic operators: arithmetic, integer, real, type cast, assignment, sizeof, relational, logic, bitwise, shortcut, ?:
Week 5: iterative solutions, =, pre/post ++ --, dangers of post, arrays, 1D, 2D, strings, pointers
Week 6: 1D dynamic array (example of use), (only breefly, at the level of usage: getchar, putchar, EOF, ctrl+z/ctrl+d) filter program template, enum type, finite automaton example: writing out the comments from a C code, ly counter
Week 7: Functions, memory areas allocated in the program, what is/will be where, the heap, behavior of the stack, the consequences of the differences. Storage classes (for local variables), the function call mechanism, multiple return values: void descart2polar(double, double, double*, double *), why forbidden to return local variable address
Week 8: struct, ., ->, typedef, direct selection sort, bubble sort, for structure array also, comparing functions, strcmp, sorting by text.
Week 9: function pointers, useage of qsort. Making of string, int and double comparing funtion (by a structure array sorting example), introducing recursive structure, ONLY drawn. Unidirectional, bidirectional, "arranged according to several criteria" list, binary tree, coded only the search in the list by cycle.
Week 10: Managing lists, insertion, search, deleting functions, the two possible head handling: head=insert(head..., and insert (&head,..., interpretation of recursion by n!, binary tree management, inorder traversal only in code level
Week 11: I/O, FILE fopen, fclose, feof, f/sprintf, f/sscanf, getc/s, Putc/s, parameters of main
Week 12: In short, what is missed: the comma op, (union, bitfield vararg), the C preprocessor.
Week 13: TEST
Week 14: backup (if there is no need to make up missed lectures then: making programs from multiple source file)
During the study period:
There is one 2 hours lecture and one 2 houres laboratory a week. The lab presence is mandatory, checked at each ocassion. Insufficient laboratory preparedness counts as missed lesson. During the semester there are five small tests written in labs. Small tests cannot be repeated. A missed small test is counted as 0. The average of the three most successful small test matter in the final mark. During the semester time a "big" midterm test is written. Succesfull mindterm is required. The midterm can be repeated one time in the study period and one time in the replacement period. A homework will be given in the sixth week of the semester in lab and it mast be presented by the student until the last lab lesson of the semester. The homework can be presented in the replacement periode for a fee.
Requirements for the successful completion of the course:• not missed more than 30% of labs,• the average of the three best small tests results of at least sufficient,• at least a pass grade in the midterm• the homework finished within the prescribed time and received a minimum pass grade.
The final grade comes as• midterm result: 35% weight• the average of the three best small tests: 35% weight• homework rating: 30% weight.• the lab leader can change the result by +/- 0.5 grade depending on the activity of the student.
Any book or note of the C programming language can be used. For example:
[1] B.W. Kernighan - D.M. Ritchie: The C Programming Language. Prentice Hall, 1988. 2nd edition[2] Dan Gookin: C All-in-One Desk Reference For Dummies, Wiley Publishing, Inc. (September 3, 2004)
Dr. András Poppe
Assistant lecturer