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
Describe the order of precedence with regards to operators in C.
How do you determine the length of a string value that was stored in a variable?
Can you please explain the difference between malloc() and calloc() function?
Who developed c language?
Write the syntax and purpose of a switch statement in C.
What are header files in c?
What is data structure in c language?
What does nil mean in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Are enumerations really portable?
Explain how can I make sure that my program is the only one accessing a file?
Write a program to check prime number in c programming?
Explain what is the benefit of using #define to declare a constant?
Differentiate between functions getch() and getche().
What are the 3 types of structures?