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
Explain goto?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What do you know about the use of bit field?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
code for replace tabs with equivalent number of blanks
how logic is used
What is wrong with this statement? Myname = 'robin';
What do you mean by command line argument?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What should malloc() do?
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]
Explain how can I convert a string to a number?
What is a structure in c language. how to initialise a structure in c?
What is the difference between array and pointer?