can we declare a variable in different scopes with different
data types? answer in detail
Answer Posted / tatukula
Yes,
why because that variable scope is ends with in that block only...
int main()
{
int a=20;
printf("%d\n",a);
{
char a='c';
printf("%c\n",a);
}
printf("%d\n",a);
}
output: 20 c 20
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a list in c?
What are the modifiers available in c programming language?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is a null pointer in c?
How can you check to see whether a symbol is defined?
What are c preprocessors?
Explain the use of bit fieild.
what type of questions arrive in interview over c programming?
What is the basic structure of c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What are the uses of null pointers?
What is a structure and why it is used?
What does 4d mean in c?
Does c have enums?
how can I convert a string to a number?