See a problem in else if statement

Dangling else problem

Image
Hello, This problem comes when we use else if statement and do some mistake more describe is given below......... Dangling else problem: One of the major problem with nested if is dangling else problem. The problem arises when both outer if statement inner if statement might pair with common else statement. Thus the compiler is not able to judge to pair the else with which statement. The solution to this problem is given by the compiler that it pairs else with the recent if thus sometimes giving wrong result.                                           Hence the programmer should put early bracket wherever required. This post is may very short because my only aim was to describe this problem. Thank you, Keep supporting............. 

Introduction to C part 2

                                   C programming

hello friends,this is second part of introduction of C.

Identifiers:

Identifiers help us to identify data and other objects in the program. Identifiers are basically the name given to program elements such as variables,array and functions.
  • Identifiers cannot include any special characters or punctuation marks except the underscore.
  • Keywords cannot be used as identifiers.
  • Identifiers must began with a letter or an underscores.

Basic Data Types in C:

C language provide very few basic data types.

Variables:

A variable is defined as a meaningful name given to a data storage location in computer memory.C language supports two basic kinds of Variables- numeric and character.

Constants:

Constants are identifiers whose value do not change.While value of variables can be changed at any time.

Input/output statement in C:

printf:

The printf function is used to display information required by the user and also display the value of variables. The printf function takes data value , converts them to text stream using formatting specification in the control string and passes the resulting text stream to standard output.

**************************************************************************
(Normally printf Statement ka use kisi sentence ya information ko screen per display kerne ke liye use kiya jate hai. Us statement ko aap printf keyword type kerke () ka use and then inside bracket " " double quotes me us sentence or anything  jisko bhi display kerna chahte hai screen)

scanf:

The scanf function stands or use for read data from the keywords.

(if any heading you want more explain in any language hindi or english please comment below i wil create new post for that language)

Thank you .........

Comments

Post a Comment

Popular posts from this blog

Libraray Fine Hackerrank solution in C || Balanced Brackets Hackerrank solution in C

Permutations of Strings hackerrank solution in C || Permutations of Strings