extern static int i
func()
{
i =10;
i++;
printf("%d \n",i);
}
main()
{
i =20;
printf("%d \n",i);
func();
printf("%d \n",i);
}
Answer Posted / vadivelt
Program should give compiler error. Cos, u r trying to
allocate two different storage area to sigle int
variable 'i'.
ie.,
The below statement is invalid.
extern static int i;
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is the difference between volatile and const volatile?
Differentiate Source Codes from Object Codes
Differentiate between the = symbol and == symbol?
What is character set?
What are lookup tables in c?
I need previous papers of CSC.......plz help out by posting them.......
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What is a static variable in c?
Is it better to use a macro or a function?
What is function prototype in c language?
Write a program in c to replace any vowel in a string with z?
What tq means in chat?
Explain how do you determine a file’s attributes?
Define recursion in c.
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.