Undefined reference to 'printf' ?????? Do we need to link the library for printf also like libm-Collection of common programming errors
Here is the code …
/*Program to print a menu driven program*/
/*Author:Udit gupta     Date:09/08/2011*/
#include
#include
int main () {
    int fact=1,i=1,n;
    while (1) {
    printf("Please select one of the following options............\n");
    printf("1. Factorial\n");
    printf("2. Prime or Not\n");
    printf("3. Odd or Even\n");
    printf("5. Exit\n");
    prinf ("\n\tEnter the value :");
            scanf ("%d",&n);
    switch (n) {
            case 1 :
                    while (iOriginally posted 2013-11-27 12:10:23.