what is the difference between declaration ,defenetion and
initialization of a variable?
Answer Posted / harshit
there is no practical such as declaration its in theory only
the only practical application is :
int a; //defination
a=10; //intialization
this is a normal thing we do,,,now
somemethod()
{
int a;//defination
}
main()
{
extern int a;//declaration
a=10//intialization
}
here we declare that there is a variable "a" somewhere
n this is the only use of declaration ...
to best of my knowledge...
plz suggest if someone kno better
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Why is c still so popular?
What is a pointer in c?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Difference between macros and inline functions? Can a function be forced as inline?
pierrot's divisor program using c or c++ code
What is the difference between new and malloc functions?
How many bytes is a struct in c?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What is a lookup table in c?
Do array subscripts always start with zero?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
How can you avoid including a header more than once?
How can I send mail from within a c program?
Write a program of advanced Fibonacci series.