what is the difference between global variable & static
variable declared out side all the function in the file.
Answers were Sorted based on User's Feedback
Answer / vishnu
Both the variables are stored in data segment but difference
is in accessing the variable. Global variables can be
accessed though out the project (if multiple files exists)
whereas static variable accessed within the file where its
declared.
Is This Answer Correct ? | 15 Yes | 2 No |
Answer / ashwinishaligram308
global variableis allocated on heap and static variables on
stack
Is This Answer Correct ? | 2 Yes | 11 No |
what is difference between array of characters and string
Write a program that accept anumber in words
Explain union.
What is assert and when would I use it?
Does sprintf put null character?
What is the general form of a C program?
Differentiate call by value and call by reference?
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)
Explain can the sizeof operator be used to tell the size of an array passed to a function?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
0 Answers Aegis, CDAC, Infosys,
Add Two Numbers Without Using the Addition Operator
using only #include <stdio.h> and #include <stdlib.h> Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.