what is the difference between declaration ,defenetion and
initialization of a variable?

Answer Posted / sakthi sudhan

declaration : int a;
declaration means here a is declared as integer variable
initialization : int a = 5;
initialization is whatever you have declared give that
variable some value
definition : int a;
definition is whatever variable you have declared give it's
datatype as here a is declared as integer variable

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a memory leak? How to avoid it?

578


Is flag a keyword in c?

682


Explain union. What are its advantages?

620


What is difference between structure and union in c?

549


Write a c program to demonstrate character and string constants?

1685






How variables are declared in c?

573


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2653


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

2861


What are the two types of structure?

579


What is getch?

633


What is the difference between variable declaration and variable definition in c?

565


Explain null pointer.

623


Can a variable be both const and volatile?

677


What is a stream in c programming?

597


How do c compilers work?

612