CategoryUncategorized

Dynamic memory allocation in C

D

Standard memory allocation and release functions are usually declared in the stdlib.h header file.     -void * malloc (size_t size);     -void * calloc (size_t nmemb, size_t size);     -void * realloc (void * ptr, size_t size);     -void free (void * ptr); The three allocation functions (malloc, calloc, and realloc) result in the assigned memory allocation (void *) and as a common argument the...

C operators

C

C language operators can be unary, binary or ternary, each having a clear precedence and associativity. The following table summarizes the operators of the C language. Operators are presented in descending order of priority. Precedence Operator Description Associativity 1 Index left-right 1 . and -> left-right member selection 1 ++ and – Postincrementare / postdecrementare left-right 2 ...

Fundamental data types

F

Data types are the type of information that can be stored in a variable. In a data type, we determine both the range of values ​​that a variable of a given type can take and the operations that can be performed on it. The following are the basic types of C language, together with a brief description of these: 1. char – represented by an 8-bit number (one byte). It can be either a signed...

C language instructions

C

1. Conditional instructions If-else if else is the simplest conditional statement. It can be used in several forms. The statement evaluates the expression and executes the instructions between the braces only if the result is nonzero. Together with else, for the result n is executed with the instruction set situated after else. switch Switch is an instruction designed to simplify conditional...

Design patterns – Singleton, Factory, Observer

D

Design patterns are general and reusable solutions to a common problem in software design. A pattern design is a description of the solution or a template that can be applied to solve the problem, not a piece of code that can be applied directly. In general, object-oriented patterns show relationships and interactions between classes or objects without specifying the final shape of the classes or...

Structured programming

S

Structured programming is a paradigm of computer programming due to the growing complexity of computer programs. It has emerged as a new programming model in order to create new programming techniques that can produce programs that are safe to operate for longer. In the late 1960s, due to the rapid development of data processing with the computer, it was possible to address and solve increasingly...

Different PHP data types and how to use them

D

PHP is simple to use, besides being a structured programming language, like C, Perl or from version 5 upwards even Java, the syntax of language being a combination of the three. Due to its modularity, it can also be used to develop standalone applications, for example in combination with PHP-GTK, or can be used as Perl or Python on the command line. Perhaps one of the most important features of...

Object-Oriented Programming

O

Object-Oriented Programming (OOP) is a programming paradigm, focused on the idea of ​​encapsulation, that is, the grouping of data and code that operates on them in a single structure. Another important concept associated with object-oriented programming is polymorphism, which allows abstractions to allow for a more straightforward conceptual description of the solution. Object-oriented...

What is PHP

W

PHP is a programming language. The PHP name comes from English and is a recursive acronym: PHP: Hypertext Preprocessor. Used initially to produce dynamic web pages, it is widely used in the development of web pages and web applications. It is mainly embedded in HTML, but starting with version 4.3.0, it can also be used in the “command line” (CLI) mode, allowing for the creation of...

Types of primitive data

T

In Java, data types are divided into two categories: primitive types and reference types. Java starts from the premise as ” anything is an object ”, therefore data types should actually be defined by classes and all variables should store instances of these classes. Basically, this is true, but for ease of programming, there are also the so-called primitive types of data, which are...

Recent Posts

Archives

Categories