Bhanu Priya has Published 1581 Articles

What are the 4 steps to convert C program to Machine code?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:03:14

4K+ Views

Process of Creating and Running ProgramsA program contains a set of instructions which was written in a programming language.The programmer’s job is to write and test the program.The 4 steps to convert a ‘C’ program into machine language are &miuns;Writing and editing the programCompiling the programLinking the programExecuting the programWriting ... Read More

Explain reference and pointer in C programming?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 06:31:53

716 Views

ProblemExplain the concept of reference and pointer in a c programming language using examples.ReferenceIt is the alternate name for the variable that we declared.It can be accessed by using pass by value.It cannot hold the null values.Syntaxdatatype *variablenameFor example, int *a; //a contains the address of int type variable.PointerIt stores ... Read More

Limitations of C programming language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 06:30:36

3K+ Views

ProblemWhat are the limitations of C Programming when compared to other programming languages?SolutionC Language prevents or prohibits the concepts of object-oriented programming language like inheritance, polymorphism, encapsulation, and data abstraction.C programming language does not detect errors for every line of coding, it will check the bugs after the complete coding ... Read More

Example program on Dynamic memory allocation function in C language

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:36:21

547 Views

ProblemHow to display and calculate the sum of n numbers by using dynamic memory allocation function in C language?SolutionFollowing is the C program to display the elements and calculate the sum of n numbers by the user by using dynamic memory allocation functions. Here, we also try to reduce the ... Read More

How to use ‘else if ladder’ conditional statement is C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:35:00

486 Views

Else − if the ladder is the most general way of writing a multi-way decision.The syntax for else if the ladder is as follows −if (condition1)    stmt1; else if (condition2)    stmt2;    - - - - -    - - - - -    else if (condition n) ... Read More

What are the shift operations in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:32:55

635 Views

ProblemWhat is the simple program to show the left, right shifts, and complement of a number by using C language?SolutionLeft ShiftIf the value of a variable is left-shifted one time, then its value gets doubled.For example, a = 10, then a1 = 5ExampleFollowing is the C program for the shift ... Read More

How to delete the vowels from a given string using C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:31:28

4K+ Views

The logic we use to implement to delete the vowels from the given string is as follows −for(i=0; i

How to use Pre-defined mathematical function in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:29:13

237 Views

ProblemHow to find the cube root of any given number by using the C programming language?SolutionAlgorithmStep 1: Enter any number at run time Step 2: Read from console Step 3: Compute result         Result:pow(number, 1.0/3.0) Step 4: Increment result Step 5: Print resultExampleFollowing is the C program ... Read More

What are the input and output for strings in C language?

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:27:24

4K+ Views

An array of characters (or) collection of characters is called a string.Input and output for stringsExampleFollowing is the C program for input and output for strings −#include main ( ){    char a[30];    printf("enter your name");    scanf ( "%s", a);    printf ("your name is %s", a);   ... Read More

What is a string? Declare and initialize the strings in C language

Bhanu Priya

Bhanu Priya

Updated on 08-Mar-2021 10:26:10

6K+ Views

An array of characters (or) collection of characters is called a string.DeclarationRefer to the declaration given below −char stringname [size];For example - char a[50]; a string of length 50 characters.InitializationThe initialization is as follows −Using single character constant −char string[20] = { ‘H’, ‘i’, ‘l’, ‘l’, ‘s’ ,‘\0’}Using string constants ... Read More

Advertisements