What is the difference between declaring a variable by
constant keyword and #define ing that variable?



What is the difference between declaring a variable by constant keyword and #define ing that varia..

Answer / ganesh

constant- it cannot be changed
# define - it can be changed if we can redefine

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

i=10,j=20 j=i,j?(i,j)?i:j:j print i,j

1 Answers   CSC,


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?

3 Answers  


What is a good data structure to use for storing lines of text?

0 Answers  


Explain demand paging.

1 Answers   Agilent,


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

0 Answers  


biggest of two no's with out using if condition statement

8 Answers  


Why cant I open a file by its explicit path?

0 Answers  


which is an algorithm for sorting in a growing Lexicographic order

0 Answers  


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  


Explain the differences between public, protected, private and internal.

2 Answers  


Program to display given 3 integers in ascending order

1 Answers   N Tech,


Categories