Explain about block scope in c?
Answer / Rupesh Kumar Pandey
In C, the block scope refers to variables that are declared within curly braces `{}`. These variables exist and can be accessed only within the blocks they are defined. They are initialized each time the block is entered and destroyed when the control leaves the block.
| Is This Answer Correct ? | 0 Yes | 0 No |
There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side?
main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
how can you print&scan anything using just one character? :) HINT: printf,scanf similer
The statement, int(*x[]) () what does in indicate?
What is pointer & why it is used?
can i know the source code for reversing a linked list with out using a temporary variable?
How the C program can be compiled?
what will be the output: main(){char ch;int a=10;printf("%d",ch);}
36 Answers Accenture, TCS, Wipro,
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is difference between && and & in c?
write a programme to convert temperature from farenheit to celcius?