Bhanu Priya has Published 1449 Articles

Explain Compile time and Run time initialization in C programming?

Bhanu Priya

Bhanu Priya

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

19K+ 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

2K+ 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

1K+ 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

7K+ 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

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

5K+ 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

516 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

14K+ 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

5K+ 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

939 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

4K+ 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

Advertisements