Bhanu Priya has Published 1660 Articles

Explain Compile time and Run time initialization in C programming?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:18:46

13K+ Views

Let’s take the concept of arrays to about compile time and run time initialization −ArrayArray is a collection of items stored at contiguous memory locations and elements can access by using indices.Compile time array initializationIn compile time initialization, user has to enter the details in the program itself.Compile time initialization ... Read More

Why is the compiler not reading string after integer in C programming?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:17:09

1K+ Views

ProblemCompiler not reading the string after integer in C programming? How can we solve this problem?SolutionWhen you enter an integer number and press enter to read next value, compiler stores null into the string’s first char and string input terminates. Because scanf will terminate whenever it reads a null character.How ... Read More

What is the common error occurred while using scanf() statement in C language?

Bhanu Priya

Bhanu Priya

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

761 Views

ProblemCommon error occurred while reading string and numeric data using scanf() function in C languageSolutionThe scanf() function is used to read formatted input from stdin in C language. It returns the whole number of characters written in it otherwise, returns a negative value.Generally in case of scanf() function while reading ... Read More

How to print a name multiple times without loop statement using C language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:13:35

6K+ Views

ProblemTry to print a name 10 times without using any loop or goto statement in C programming language.SolutionGenerally, looping statements are used to repeat the block of code until condition is false.Example1In this program, we are trying to print a name 10 times without using loop or goto statements. Live Demo#include ... Read More

The decision-making concepts in C language using flow chart and programs

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:11:59

2K+ Views

Following are the decision making statements −simple – if statementif – else statementnested – if else statementelse – if ladderswitch statementSimple – if statementThe ‘if’ keyword is used to execute a set of statements when the logical condition is true.Syntaxif (condition){    Statement (s) }ExampleThe following example checks whether a ... Read More

Is it possible to give arguments in the main() function in C language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:10:36

4K+ Views

Yes, we can give arguments in the main() function.Command line arguments in C are specified after the name of the program in the system’s command line, and these argument values are passed on to your program during program execution.The argc and argv are the two arguments that can pass to ... Read More

Find the ASCII value of the uppercase character ‘A’ using implicit conversion in C language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:09:37

338 Views

Implicit type conversion is done by the compiler by converting smaller data type into a larger data type.For example, ASCII value of A=65.In this program, we are giving character ‘A’ as input, now write a code to convert A to 65 which is its ASCII value.ExampleFollowing is the example to ... Read More

What are the different types of functions in C Programming?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:06:23

13K+ Views

Functions are broadly classified into two types which are as follows −predefined functionsuser defined functionsPredefined (or) library functionsThese functions are already defined in the system libraries.Programmer can reuse the existing code in the system libraries which is helpful to write error free code.User must be aware of syntax of the ... Read More

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 the history of C language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 07:01:30

21K+ Views

C is one of the high-level programming languages developed by Dennis Ritchie.C was originally developed for UNIX operating system to beat the issues of previous languages such as B, BCPL, etc.The UNIX operating system development started in the year 1969, and its code was rewritten in C in the year ... Read More

Advertisements