What is difference between initialization and assignment?

Answers were Sorted based on User's Feedback



What is difference between initialization and assignment?..

Answer / rahul rasal

Simple Word In my Word..

Initilize:
E.g:
int i;

Assign:
E.g:
int i=30;

Is it Right...?

Is This Answer Correct ?    3 Yes 8 No

What is difference between initialization and assignment?..

Answer / shweta iyer

In initialization, we provide the variable with some initial values which can be changed later. But in assignment, we provide the variable with a fixed value which remains same throughout the whole program.

Is This Answer Correct ?    8 Yes 14 No

Post New Answer

More C++ General Interview Questions

Describe Trees using C++ with an example.

0 Answers  


Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

2 Answers  


Describe private, protected and public?

0 Answers  


Can a new be used in place of old mallocq? If yes, why?

0 Answers  


What is switch case in c++ syntax?

0 Answers  






write a program that takes 5 digit no and calculate 2 power that no and print it.

3 Answers  


How to stop conversions among objects?

5 Answers   Symphony,


What are pointers used for c++?

0 Answers  


let a,b,c be three integer numbers.write a c++ program with a function void rotate 1()such that a->b->c and c->a.

1 Answers  


3- Write a program to find larger and smaller of the two numbers.

4 Answers   Luminous,


How many standards of c++ are there?

0 Answers  


structure contains int, char, float how it behaves for big endian and little endian?

1 Answers   BITS,


Categories