Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Solution to C prog
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Venkateswaru Busam
Solution to C prog
0 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners


Hi,

Pls any body help, why the following prog crashing while running.

#include<stdio.h>
#include<conio.h>
int main(){
    int n,*fact(int *n);
    printf("Enter the number:");
    scanf("%d",&n);
    printf("The factorial is %d\n",*fact(&n));
    getch();
}
int *fact(int *p){
    int *res;
        if(*p == 1)
            return(&1);
        else{
            *res = (*p)-- * *fact(p);
        }
    return(&res);
}

Thanks Venkii.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Solution to C prog
Solution to C prog   Hi, Pls any body help, why the following prog crashing while running. #include<stdio.h> #include<conio.h> int main(){ int n,*fact(int *n); printf("Enter the number:"); scanf
turbo C prog.
turbo C prog.  Is is possible print ASCII value of a alphabets using turbo C prog
Advertisements
turbo C prog.
turbo C prog.  Is it possible to print ASCII value A to Z with out...;#include<stdio.h> #include<conio.h> void main() { for(char c='A';c<='Z';c++){ printf("\nASCII of %c is %i\n", a, a); } getch(); } C
turbo C prog. Q3
turbo C prog. Q3  What is the difference between if and ladder... } Example of ladder if: #include <stdio.h> main() { int a,b,c; printf("enter values for a,b,c"); scanf("%d%d%d",&a,&b,&c); if(a>
(ForPro) turbo C prog. Q4
(ForPro) turbo C prog. Q4  I need to learn some easy foxpro program.. for example sum,interchange, loop etc
solution of k map in c
solution of k map in c  write a program in c to solve k-map with digital circuit
solution
solution   A developer wants you to develop a simple take away restaurant order service. The system reads from a file containing information about the restaurant (such as the name, place and menu). The system then allows the user
solution
solution   A developer wants you to develop a simple take away restaurant order service. The system reads from a file containing information about the restaurant (such as the name, place and menu). The system then allows the user
SOLUTION: How to compile Objective C on Windows with GNU Step ?
SOLUTION: How to compile Objective C on Windows with GNU Step ?  <p>I just started learning ObjC today and found this tutorial informative, except the fact that the above program needs some more instructions to run. Here
NEED A PROG
NEED A PROG   whats the program to add,delete, display elements of an object using collecions. without using linked list   Hi Friend, Try the following code: import java.util.*; class CollectionExample { public
java prog que
java prog que  create a class that returns the reverse of each word in the given string. For example if we give "who are u?" as input, it should return "ohw era u
question "writing prog"
question "writing prog"  Hello I want helping for this question, please Write a program that reads some friendsā?? names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
servlet prog - Java Interview Questions
servlet prog  how to forward or redirect the client request from servlet to jsp? how a thread or request pass from one servlet prog to one jsp prog? is it possible of communicating from servlet to jsp prog? please explain briefly
make a prog for this query
make a prog for this query  write a program implementing interface for personal data n salary details. interface must contain abstract methods. steps for the program are 1) store the data in text file 2)display salary when emp id
Java entry prog.
Java entry prog.  Dear sir I will enter the dept code, dept name and insert into dept_mast and save. Pl. Dept_mast Dept_code Char(2) Primary key (no duplicate key allowed) Dept_name Char(25
Prog Error - JSP-Servlet
Prog Error   Place Ad function Browse() { Advertisement Management System Create Ad State: City: Main Category: Sub Category: Title
c#
c#  how to find out the size of the BMP image in C
C++
C++  How can i write this in dev c
C++
C++  How can i write this in dev c
c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator
c#
c#  how to find out the size of the BMP image
c++
c++  write a programme that calculates the area and circumference of a rectangle
C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
C++
C++  Trace the bubble sort using the following integers,which represent the elements in an array. 5,7,3,8,6,7,3
c++
c++  write a prgrm tht accepts 3 integer values,then with a function to swap the values
Advertisements
 

 

 

DMCA.com