Explain the difference between the local variable and global variable in c?
Answer / Vinay Kumar Katiyar
Local variables have their scope limited to the function or block where they are defined, while global variables can be accessed from any part of the program. Local variables are initialized each time the function is called, but global variables maintain their value throughout the entire execution of the program.
| Is This Answer Correct ? | 0 Yes | 0 No |
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Explain what is a pragma?
How pointer is different from array?
What is the role of this pointer?
What is hash table in c?
Do pointers take up memory?
Is c pass by value or reference?
Given a number N, product(N) is the product of the digits of N. We can then form a sequence N, product(N), product(product(N))… For example, using 99, we get the sequence 99, 99 = 81, 81 = 8. Input Format: A single integer N Output Format: A single integer which is the number of steps after which a single digit number occurs in the sequence. Sample Test Cases: Input #00: 99 Output #00: 2 Explanation: Step - 1 : 9 * 9 = 81 Step - 2 : 8 * 1 = 8 There are 2 steps to get to this single digit number. Input #01: 1137638147
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****
Bit swapping
What language is c written?
no consistent academics. how to answer the question