What is the output of the following progarm?
#include<stdio.h>
main( )
{
int x,y=10;
x=4;
y=fact(x);
printf(“%d\n”,y);
}
unsigned int fact(int x)
{
return(x*fact(x-1));
}
A. 24
B. 10
C. 4
D. none
Answer Posted / kalyan chukka
A.24
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Differentiate Source Codes from Object Codes
Write a program to check prime number in c programming?
find the sum of two matrices and WAP for it.
How can I manipulate individual bits?
What is the correct code to have following output in c using nested for loop?
What is the use of f in c?
Describe explain how arrays can be passed to a user defined function
Is there a way to jump out of a function or functions?
Can we declare function inside main?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
What is huge pointer in c?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
What math functions are available for integers? For floating point?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream