-
C if condition Puzzle
What's the "condition" so that the following codesnippet prints both HelloWorld !if "condition"printf ("Hello");elseprintf("World");
-
Accenture C Questions
1)Write a C program to find a peculiar two digit number which is three times the sum of its digits.2) Bacteria are known to multiply very rapidly. If a certain container contains just one bacterium on the first day and there are twice as many on the next day. In this manner the number of bacteria in the container doubles itself everyday. Assuming that the container would be full on the 10th day with...
-
Memory Stack or Heap
Which type of memory(stack or heap)is used by static and external variables?
-
Array is an lvalue or not?
An lvalue was defined as an expression to which a value can be assigned. Is an array an expression to which we can assign a value? The answer to this question is no, because an array is composed of several separate array elements that cannot be treated as a whole for assignment purposes. The following statement is therefore illegal: int x[5], y[5]; x = y; Additionally, you might want to copy the whole...
-
What is a static function?
A static function is a function whose scope is limited to the current source file. Scope refers to the visibility of a function or variable. If the function or variable is visible outside of the current source file, it is said to have global, or external, scope. If the function or variable is not visible outside of the current source file, it is said to have local, or static, scope.
-
What is the purpose of main( ) function?
The function main( ) invokes other functions within it.It is the first function to be called when the program starts execution.Ø It is the starting functionØ It returns an int value to the environment that called the programØ Recursive call is allowed for main( ) also.Ø It is a user-defined...
-
-
A Program that does nothing
Write a program in C that does nothing not even takes memory?
-
-
-
-
-
C program to count numbers of positive and negative numbers
Write a C program using arrays to count the numbers of positive and negative numbers which accepts the inputs as "size of the array" & "elements of the array" and outputs as "number of negative numbers in an array are" & "numbers of positive numbers in an array are" ?
What will be difference b/w 5th and 6th statements?
1. #define MAX 1002. main()3. {4. int max=100;5. int a[MAX];6. int b[max];7. }
Garbage Value
In C if a variable is not assigned a value then why does it take garbage value?
Write the equivalent expression for x%8?
x&7 Write expressions to swap two integers without using a temporary variable?
Ans