int

  1. S

    Find the output of this program...only a few lines

    #include<stdio.h> int fn(int); int main(char argc,char **argv) { fn(3); return 0; } int fn(int n) { int temp=0; if(n>0) { temp = n + fn(--n); } printf("%d",temp); return 0; } I got the ouput as 0012....can anyone explain to me why??? #include<stdio.h> int...
  2. VINSTAR

    C programing DOUBT

    i write a C program to perform the functions of a calculator, as this #include<stdio.h> #include<conio.h> int sum(int,int); int dif(int,int); int pro(int,int); float div(int,int); void main() { int a,b; char o; clrscr(); printf("enter the numbers "); scanf("%d%d",&a,&b); printf("enter the...
  3. hrushij

    proble with turbo c complier..!

    This code works fine on borlaand c++ 5.0 but it scans only first object in turbo c++ IDE what is the problem with this..??? #include <stdio.h> #include <conio.h> struct student { char name[10]; int no; float marks; }; void main() { struct student s[5]; int i...
  4. Gigacore

    Post your C/C++ Programs Here

    Hi guys n gals, If you are a good at C/C++ Programming or if you are a programmer or just know this language then post you Programs here. By this way it helps learners a lot. Members can post their programs and get suggestions if there is anything wrong it...... Use this Pattern: A Program...
  5. nikhil ramteke

    simple c++ program

    watch the following code:- #include<conio.h> #include<iostream.h> int main() { int c=0,a=0,b=0; clrscr(); cout<<"c="<<c++<<"\n"; cout<<"c="<<c<<"\n"; b=a++ +c++ +c++; cout<<"a="<<a<<"\n"; cout<<"b="<<b <<"\n"; cout<<"c="<<c; getch(); return 0; } o/p:- c=0 c=1 a=1 b=2 c=3 plz tell...
  6. arunks

    plz remove error in my c program

    i wrote a program which is given below #include<stdio.h> #include<conio.h> struct employee { char name[5]; char deptt[5]; int idcode; float s; }; void main() { struct employee emp[2]; int i,j; clrscr(); for(i=0;i<2;i++) { gets(emp[i].name); gets(emp[i].deptt); scanf("%d",&emp[i].idcode)...
  7. arunks

    help me urgently to understand this in C

    int a=10,s; s= ++a + a++ + --a + a--; what would be the poutput for s?? according to me it should be 44 but when i run this code in C it displays 40... why is it so... plz anybdy help me to understand that? but if i use this int a=10,s; printf("%d",++a + a++ + --a + a--); this code...
  8. S

    C++:Adding two numbers

    We have just started C++ in college #include <iostream> using namespace std; main() { int a,b,c; cout<<"Enter two nos.:"; cin>> a >> b; c=a+b; cin.get(); cout<<"Sum is"<<c<<""; cin.get(); } but on compiling and running it{no errors here}nothing happens when i...
  9. blackleopard92

    insane C program needing explanation

    does anybody have any idea what's going on here? #include <stdio.h> int main() { float a = 65.375; char *p; int i; p = (char*)&a; printf("%c\n",*p); for(i=0;i<=3;i++) printf("%02x",(unsigned char)p); printf("\n"); printf("\n"); return 0; }
  10. anantkhaitan

    File handling using GCC/G++

    Friends point me where I m wrong. Code: Command for compilation : Error message(s):
  11. eagle_y2j

    Help me over C project !

    Can any of you check my BCA xcam project to find any bug ? I just completed this stuff using help from internet (answers) not sure are they correct or not ! Help will really be appreciated :-) Question 1: Write a C program to create a calculator. The program will accept an arithmetic...
  12. morpheusv6

    Turbo CPP 3.0 help

    I recently installed TCpp 3.0 on my system. I am intrested in doing a grpahics oriented project in C. But I am unable to use graphics.h. initgraph() does not seem to function! After typing the following code: #include<conio.h> #include<graphics.h> int main() {
  13. paragkalra

    GCC vs VISUAL STUDIO

    I need your help very urgently....... Actually my HOD (head of department) is doing PHD.... He has a .c file which can be successfully compiled on LINUX using gcc.... I myself have successfully compiled it on REDHAT Now he wants to compile the same program on Windows using VISUAL...
  14. Official Techie

    c++

    class stationary { char type; char manufacturer[10]; public : stationary(); void Read_sta_details(); void Disp_Sta_details(); }; class office : public stationary { int no_of_types; float cost_of_sta; public: void Read_off_details(); void Disp_off_details(); }; class...
  15. Official Techie

    problems in programming language

    i want to know whats the problem i want to print the address of a initialised variable #include<iostream.h> int main() { int i; int z; z = &i; cout<<"the address"<<z; cout<<"\n"; cout<<"the value is"<<i; return i; } the error --------------------Configuration: a...
  16. P

    Can anyone figure out this C Code?

    Does anybody have any idea how this works??? #include<stdio.h> main() { int a,b,c; int count = 1; for (b=c=10;a= "- LLLLLL?, LMKC,XYZHELLO FOLKS,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\...
  17. nitish_mythology

    Java Program Error!

    I tried to make a prg to find the largest word in a string but was unable. I ended up with this.Can anyone tell my mistakes and write the correct prg!! import java.io.*; class lar_str { public static void main(String args[]) throws IOException { String str; char arr[]=new char[50]...
  18. I

    C++ question

    I wrote an encryption/decryption prog in c++ using the xor operator(im just a n00b) suppose my input is my name is dheeraj kumar. then my encrypted form is 㵧≥㙁刁Ԁ幅㸵ጕȕൽĜᰄ鉏 when i decrypt it the output is my name is dheeraj kumar.ÿš i dont know how i got the extra 2...
  19. L

    time of execution of program, in C

    hi, suppose i hav a matrix multiplication program written in C... how do i find the time it takes to calculate the result. how do i do that? also, i need the syntax for both windows and linux... thk u.. code if necessary /legolas
  20. M

    LInk List Problem , Immediate soln needed

    Hi guys , plz see this code for me The problem lies in the Inserting of node portion. #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> struct linklist { int data; linklist *next; }; typedef struct linklist node; void create(node...
Top Bottom