Bhanu Priya has Published 1581 Articles

Conversion of Hex decimal to integer value using C language

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 07:03:39

6K+ Views

ProblemHow to convert the hexadecimal value to integer value by using the C programming language?Explain the concept.SolutionHexadecimal values represent in 16 symbols 1 to 9 & A to F. Here, A to F decimal equivalent is 10 to 15.ExampleFollowing is the C program for converting hexadecimal to an integer by ... Read More

What do you mean by pointer to a constant in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 07:00:06

566 Views

The value of the pointer address is constant that means we cannot change the value of the address that is pointed by the pointer.A constant pointer is declared as follows −Data_Type const* Pointer_Name;For example, int const *p// pointer to const integerExampleFollowing is the C program to illustrate a pointer to ... Read More

Accessing variables of Int and Float without initializing in C

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:48:26

1K+ Views

ProblemDeclare int and float variables without initializing and try to print their values in C language. Explain what will happen.SolutionIf a variable is declared but not initialized or uninitialized and if those variables are trying to print, then, it will return 0 or some garbage value.Whenever we declare a variable, ... Read More

Given an example of C pointer addition and subtraction

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:45:44

2K+ Views

Pointers have many but easy concepts and they are very important to C programming.Two of the arithmetic pointer concepts are explained below, which are C pointer addition and subtraction respectively.C pointer additionC pointer addition refers to adding a value to the pointer variable.The formula is as follows −new_address= current_address + ... Read More

Demonstrate the concept of pointers using C language

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:43:58

478 Views

The pointer is a variable that stores the address of another variable.The syntax for the pointer is as follows −pointer = &variable;ExampleFollowing is the C program for the concept of pointers using C language − Live Demo#include void main(){    //Declaring variables and pointer//    int a=2;    int *p;   ... Read More

Explain the concept of pointer to pointer and void pointer in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:40:29

1K+ Views

Double pointer or pointer to pointer is a variable that holds the address of another pointer.Following is the declaration for a pointer to a pointer −datatype ** pointer_name;For example, int **p; p is a pointer to pointerInitialization − ‘&’ is used for initialization.For example, int a = 10; int *p; ... Read More

Explain the concept of pointers in C language

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:33:17

5K+ Views

The pointer is a variable that stores the address of another variable.Features of PointersPointer saves the memory space.The execution time of a pointer is faster because it directly accesses to memory location.The memory is accessed efficiently with the help of a pointer.Memory is allocated and deallocated dynamically.Pointers are used with ... Read More

What is an inline function in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:30:25

12K+ Views

The inline function can be substituted at the place where the function call is happening. Function substitution is always compiler choice.In an inline function, a function call is replaced by the actual program code.Most of the Inline functions are used for small computations. They are not suitable for large computing.An ... Read More

Compute sum of all elements in 2 D array in C

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:19:59

3K+ Views

ProblemCalculate the sum of all elements of a two-dimensional array by using run-time initialization.SolutionTwo-dimensional Array is used in situations where a table of values have to be stored (or) in matrices applicationsThe syntax is as follows −datatype array_ name [rowsize] [column size];For example, int a[4] [4];Number of elements in an ... Read More

C Program on two-dimensional array initialized at run time

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 06:18:38

289 Views

ProblemCalculate the sum and product of all elements in an array by using the run-time compilation.SolutionA two-dimensional array is used in situations where a table of values have to be stored (or) in matrices applicationsThe syntax is as follows −datatype array_ name [rowsize] [column size];For example, int a[5] [5];Number of ... Read More

Advertisements