-
Sum of two numbers without using arithmetic operators
Ex:int a=10;int b=10;int sum=a+b;without using "+" operator calculate sum
-
-
Farm Grid of Cells Arrangement - Asked at Practo
On a farm divided into a grid of cells, every cell either has grass on it or is empty. If two adjacent cells have grass, they will belong to a common field. The common field extends in all directions to all adjacent cells with grass. So, if cell A is adjacent to cell B and cell B is adjacent to cell C, and all three have grass, then they all lie in the same field. If a cell with grass has no adjacent...
How to write a program for fibonacci series using perl?
Can someone help me in writing program for fibonacci series using perl..
Finding a number which is a power of 2in a single step
How to find whether the given number is a power of 2 in single step (without using loops)?
What is the difference between loop and function recursion?
Loop doesnot allocate memory , read more : http://forum.litindia.in/forums/topic/what-is-the-difference-between-loop-and-function-recursion/
How to find angle between hands of clock between old time and new time?
input1: 02:45:56 (string)
input2: 03:06:17 (string)
output:
1) angle between the old position of hour hand and new position of hour hand
2) angle between the old position of minute hand and new position of minute hand
3) angle between the old position of second hand and new position of second handWhat is static memory allocation and dynamic memory allocation?
Static memory allocation: The compiler allocates the required memory space for a declared variable.By using the address of operator,the reserved address is obtained and this address may be assigned to a pointer variable.Since most of the declared variable have static memory,this way of assigning pointer value to a pointer variable is known as static memory allocation. memory is assigned during...
What is result for of this C Code block?
what is the result
main()
{
int x=15;
printf("%d %d %d",x!=15,X=20,XWrite a simple program to organize student marks ?
The ID (numeric part) and marks of each student can be entered. Once all the data is entered (with no sorting), the list of IDs and marks can be output in forward or reverse order (i.e. according to array index or the order you entered the data). Set a maximum number of 10 students to be entered including your own ID. Use only integer array(s). Show the output of the array in both orders.
What is statement and branch coverage for this program?
c#include
main()
{
call add();
int NO1,NO2NO3
}
void add()
{
scanf("%d",&NO1);
scanf("%d",&NO2);
NO3=sum(NO1,NO2);
printf("%d",NO3);
}
void sum(int x,int y)
{
return(x+y);
}
C program - find mistake
In following program, because of a typo mistake, the test() function returns zero. Actual expected value is different than zero. Assuming the typo mistake is fixed find the expected output and enter the number as answer.
var nums = [100,1000,10,1010];
cfunction test() {
var a = nums[0];
var b = nums[0];
for (i = 0; i < a.length; i++) {
...Which order the functions would be called?
In the following code, in which order the functions would be called?
a= f1(23,14)*f2(12/4)+f3();Print value of I in C
Print value of i ?
c#include
#include
void main()
{
int i=1*4/3-27%3^2+100*0.5(4>3?1:2);
clrscr();
printf(“%d”, i);
getch();
}
Ans