int

  1. Prongs298

    What is wrong with this program?

    it exits after i enter the choice of the menu item.. #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<math.h> #define MAX 1000 char v2; void dectobin(); void octtobin(); void hextooct(); void hextobin(); void main(){ do { printf("WHAT DO YOU WANT...
  2. RBX

    Apply modulus and still not affect series

    I found that I was getting poorer at programming, so joined Codechef and started working on an easy practice problem. Here it is - Golden Trees | CodeChef I prepared the skeleton (maybe very un-optimized), but am confused when to apply modulus so as not to lose values because of data type...
  3. Gauravs90

    Array in c problem

    I'm using windows 7 64-bit and codeblocks mingw for compiling the following program #include<stdio.h> int main() { int i,len,a[100]; printf("enter the no. of elements\n"); scanf("%d",&len); printf("enter the integers\n"); for(i=0;i<len;i++) scanf("%d",a[i])...
  4. Faun

    Creating asymmetric tree of process using fork ()

    I am trying to write a pseudocode for this process tree using fork(). A little bit of hint will be very helpful. Here is my approach, pretty sure that it's not correct. Please see attachment.
  5. P

    problem in out put while using pointer in C++

    #include<iostream> using namespace std; class test { public: int* i ; test(int k) { i=&k; } }; int main() { test p(2); cout<<"for 1st time *(p.i) :"<< *(p.i); cout<<"\n"; cout<<"for 2nd time *(p.i) :"<< *(p.i); cout<<"\n"; cout<<"for...
  6. rajsujayks

    Why does this C program crash on compilation?

    This program is supposed to read a list of numbers from two files and combine and sort the lists and generate an output file with it. The program is to be invoked from the command line, with the syntax: X:\> prg_name file1.txt file2.txt file3.txt where prg_name is the name of the program...
  7. A

    count number of whitespaces in C

    Hello everybody, I was doing a simple program to count number of whitespaces in a text file but I am stuck at it. Here is the code void main() { FILE *from; int ch,count; int c; from = fopen("newfile","r"); while ((c = fgetc(from)) != EOF) {...
  8. bijay_ps

    Please Explain

    I have downloaded this top down parsing program from the net. but am not able to understand the working of fuction "process". somebody please help me in getting the concept of the program. #include<iostream.h> #include<conio.h> #include<string.h> class parse { int...
  9. U

    Segmentation fault!!??

    A rather simple program that represents working of a queue /* Queue */ #include<stdio.h> #define MAX 10 typedef struct{ int q[MAX]; int front,rear; }queue; int main(){ int flushqueue(queue *,int); int isfull(); int isempty(); int enqueue(queue *,int); int dequeue(queue *)...
  10. nims11

    C++ gurus help me out

    i am trying to solve this easy problem at codechef.comOdd | CodeChef i have made a really short program to solve it. it gives correct answers when i test. but it exceeds the time limit in the codechef servers. my code is #include<iostream> #include <cmath> using namespace std; int main()...
  11. cute.bandar

    Need guidance and a lil programming puzzle (C)

    These days I am trying to teach myself the C programming language. So I found some puzzles for the C language that I am attempting to solve. Link! Try to do puzzle number B06 Here is the question for those to lazy to click: to solve this you can only use the rand() function from the...
  12. cute.bandar

    Podcasts anyone ?

    Does anyone here listen to podcasts ? any recommended podcasts ? I used to listen to one called 'security now'. But then stoped when I got a limited itnernet connection. Now I have got a brand new 512 kbps connection :D , and again want to get int podcasts. so recommend me a few please. Thanks
  13. veddotcom

    [C++] Need help with Pointers

    CODE 1 void main() { int arr[]={11,12,13,14,15}; cout<<&&*arr; //this line gives Expression Syntax Error, WHY??????? } CODE 2 void main() { int arr[]={11,12,13,14,15}; cout<<&(&*arr); //this line gives Lvalue Required Error, WHY??????? } What i m thinking....may...
  14. R

    core java issue:alternative for super keyword in static method

    as you know java doesn't allow the use of super keyword inside a static method,is their any way to access the data member of super class having same name and type as that of a local data member in main method without creating an object reference. class A { static int x=10;//access to 10...
  15. D

    1TB for Backup (EXT or INT)

    I want to buy a 1TB HDD but confused over whether to buy a internal or external one. The reason for confusion is that I want to use the HDD for backing up Games and Movies that I dont use or have already played them. Data gets generated at 3-4 GB per day (*cough*). I currently have a 160...
  16. vamsi360

    The Official Hello world thread!.....

    C: #include int main() { printf("Hello world!"); }
  17. ruturaj3

    Integer range in C

    HI, In C int is by default, signed short int so it uses 2 bytes(I m talking abt 16 bit compiler). and its range is -32768 to 32767. And char uses 1 byte. char ch = 1300, printf("%d",ch); prints 20. coz, it takes only 8 bits. 1300 = 0101 0001 0100 in binary. so when storing 1300...
  18. A

    [C++] Need help in calculation of more than 2 numbers

    I've made this Calculator which can only calculate for 2 inputs only. How should I write the program, so that, the user can give multiple inputs and the calculation is performed? /* Work of Ashrith Babu Rao, XII Email: a5hr1th.mb@gmail.com (c) 2008 */ #include <iostream.h>...
  19. pushkar

    Need a little help

    I am creating a little movie rental program for a project. I am in Class 12. The code is below: #include<fstream.h> #include<conio.h> #include<stdio.h> #include<string.h> #include<stdlib.h> class movie { int no; char title[100]; int year; float rating; int rented...
  20. iinfi

    RUN make command means what

    i have a USB to ethernet device which i want to use in linux. i downloaded the driver files from the net for the same but am unable to understand the instructions. the instructions in the readme go as follows. contents of the file named "Makefile"...
Top Bottom