Found 1339 Articles for C

What are the loop control statements in C language? Explain with flow chart and program

Bhanu Priya
Updated on 12-Dec-2024 17:08:18

8K+ Views

Loop control statements in C are designed to repeatedly execute operations until a specified condition is met. These Loops continue to run as long as the condition remains true. Loop control statements are used to repeat a set of statements. They are as follows − for loop while loop do-while loop For Loop in C The for loop in C allows us to repeat a set of statements a specified number of times. The for loop includes initialization, condition, and update statements within its syntax. It ... Read More

What is Evaluation, Precedence and Association in C language?

Mandalika
Updated on 20-Feb-2021 05:17:24

4K+ Views

Expressions are evaluated by the ‘C’ compiler based on precedence and associativity rules.If an expression contains different priority operators, then the precedence rules are considered.Here, 10*2 is evaluated first since ‘*’ has more priority than ‘- ‘and ‘=’If an expression contains same priority, then associativity rules are considered i.e. left right (or right to left).

What are types of expressions evaluated in C Language?

Bhanu Priya
Updated on 11-Mar-2021 10:17:10

877 Views

An expression is a combination of operators and operands.Operand is a data item in which operation is performed.An operator performs an operation on dataFor example; z = 3+2*1       z = 5Types of expressionsThe different types of expressions that are evaluated in C language are as follows −Primary expressions − The operand in this expression can be a name, a constant or any parenthesized expression. For example, c = a+ (5*b);Postfix expressions − In a postfix expression, the operator will be after the operands. For example, ab+Prefix expressions − In a prefix expression, the operator is before the operand. ... Read More

What are primary data types in C language?

Aishwarya Naglot
Updated on 11-Nov-2024 13:14:18

10K+ Views

Fundamental Data Types in C Primary data types, also known as fundamental data types, are built-in data types in C. C compilers support four fundamental data types. They are as follows − Integer Character Floating-point Double precision floating-point Primary data types are the building blocks for storing and working with different kinds of data in C. Below, we will provide a brief overview of these data types. Integral Data Types Integral data types are used to store whole numbers and characters. These are the most important data types for programming because they define how data is represented in ... Read More

What are the different computer languages?

Bhanu Priya
Updated on 11-Mar-2021 10:14:05

776 Views

The programming languages are used to give instructions to the computer in a language which a computer can understand.Computer languages are classified into three types as follows −Machine languagesSymbolic languagesHigh level languagesMachine languagesComputer is a machine. Since, its memory can store only 1’s and 0’s, instructions must be given to the computer in streams of 1’s and 0’s i.e. binary code.These are easily understandable by the machine.Programs written in binary code can be directly entered into computer for execution and it is known as machine language.Advantages of machine language include −Execution is very fast.It is very difficult to write and ... Read More

What is an algorithm and flowchart in C language?

Bhanu Priya
Updated on 24-Jan-2025 16:17:59

33K+ Views

The algorithm is a step–by–step procedure that is helpful in solving a problem. If it is written in English-like sentences then, it is called PSEUDO CODE. It is a formula or a set of steps that solves a particular problem for a specified problem. Each step in the algorithm must be specified clearly. A programming algorithm is a process or formula for solving a problem. It involves a sequence of specified actions that describe how to perform a task, which the computer executes consistently. An algorithm follows a procedure consisting of inputs and produces a result, known as the output. ... Read More

State the importance of C language and its general structure

Bhanu Priya
Updated on 11-Mar-2021 08:36:53

7K+ Views

C programming is a general-purpose, procedural, imperative computer programming language.Importance of C LanguageC is called as a robust language, which has so many built-in functions and operations, which can be used to write any complex program.Generally, we use to call C as a middle level language. Because, the ‘C’ compiler combines the capabilities of an assembly language with the features of a high-level language. Therefore, it is best for writing both system software and business packages.‘C’ Programs are efficient and fast.C is highly portable, that is, ‘C’ programs written on one computer can be run on another with little (or) ... Read More

Differentiate the NULL pointer with Void pointer in C language

Sindhura Repala
Updated on 06-Dec-2024 15:41:23

12K+ Views

The difference between a Null pointer and a Void pointer is that a Null pointer represents a value, while a Void pointer is a type identifier. NULL Pointer A null pointer indicates that it does not point to anything. If a pointer has no assigned address, it should be set to null. Each pointer type, such as int* or char*, can have a null pointer value. The syntax is as follows − * = NULL; Example Following is the C program for NULL pointer − #include int main() { printf("TutorialPoint C ... Read More

What happens if we include header file for two times in a C program?

Bhanu Priya
Updated on 11-Mar-2021 08:16:08

1K+ Views

C header files include some predefined functions. For example, printf() and scanf() functions are defined in the stdio.h header file.Each header files in C contains different predefined functions to make programs simple to understand.When a header file is included two times in a C program, the second one gets ignored. In actual, the #, called the include, preceding a header file ensures that it is included only once during the compilation process.Example 1Following is the C program for computing an average of three numbers − Live Demo#include #include //header file included twice ,ignored by compiler main(){    int a, b, c, ... Read More

What are the different searching techniques in C language?

Bhanu Priya
Updated on 11-Mar-2021 07:59:07

10K+ Views

Searching technique refers to finding a key element among the list of elements.If the given element is present in the list, then the searching process is said to be successful.If the given element is not present in the list, then the searching process is said to be unsuccessful.C language provides two types of searching techniques. They are as follows −Linear searchBinary searchLinear SearchSearching for the key element is done in a linear fashion.It is the simplest searching technique.It does not expect the list to be sorted.Limitation − It consumes more time and reduce the power of system.Input (i/p)Unsorted list of ... Read More

Advertisements