15,550 Topics

Member Avatar for
Member Avatar for cutedipti

Hi I need one example on regression. Also tell between recursion and regression which one is faster?

Member Avatar for Narue
0
95
Member Avatar for Aus89

I have the following code, the arrays are global variables. [CODE] #define MEMORY 64000; #define NUMFRAMES 6400; int mem[MEMORY]; int frames[NUMFRAMES]; [/CODE] I was pretty sure this should work as I don't see why it shouldn't but I am getting "parse error before ';' token" for both array declarations. Although …

Member Avatar for Narue
0
118
Member Avatar for sanushks

I'm a C novice, require help on parsing text files and storing in an array or another text file: Below is the data which are partly pipe delimited values and part of it are name-value pairs, for instance the "cma{PL}Ind{1}man{6}gal{0}cif{}" mentioned below cma is the field name and PL is …

Member Avatar for sanushks
0
129
Member Avatar for Kerry

[COLOR=Blue][SIZE=2][FONT=Times New Roman]Hello, my name is kerry and i just sign up .Well, my question is how do reverse a number input by user using recersive function.Thanks for the help. [/FONT] [/SIZE] [/COLOR]

Member Avatar for c0ld sn1ff3r
0
503
Member Avatar for srivtsan

Can someone tell me how the series is to be implemented in c 1,1,1 2,1 2 3,1 2 3 4 5, 1 2 3 4 5 6 7 8 here is my code but i am not able to get the answer [code] #include<stdio.h> int i,n1=0,n2=1,n3,n; void main() { printf("\n …

Member Avatar for Aia
0
93
Member Avatar for serkan sendur

i am pretty new to assembly language and i wonder what is difference between the final binary output of the same program written in c and written in an assembly if they do exactly the same thing. if the binary output is the same then why use assembly language? if …

Member Avatar for Ancient Dragon
0
279
Member Avatar for anny**

see buddies i make a program in c but it take enter 1st number then ask for opearator and then directly tell that wrong opearator iam tired but i cant find where is problem here it is ::::: [ICODE] #include <conio.h> #include <math.h> #include <stdio.h> #define PI 3.14159265 int main() …

Member Avatar for Narue
0
150
Member Avatar for maker10

Hi All, I'm trying to figure out how I canFirst, enter the number of salaries to process: 4 Now enter the 4 salaries to be averaged. Enter salary #1: 10000 Enter salary #2: 8000 Enter salary #3: -20000 *** Invalid entry. Salary must be positive. *** Enter salary #3: 25000 …

Member Avatar for Sci@phy
0
72
Member Avatar for TheBeast32

Hi, I keep getting an undefined identifier error when I try to do this: [Code=C] typedef char bool; // Make a bool type char false = 0, true = 1; // Make true and false void foo() { switch (something) { case 1: bool aaaaa; break; } } [/Code] It …

Member Avatar for Sci@phy
0
66
Member Avatar for PhoenixInsilico

The following program should take 4 numbers but it takes 5 numbers and prints first 4 number entered. How to correct the problem??? [ICODE]#include<stdio.h> #include<conio.h> void main() { int a1,a2,a3,a4; printf("Enter 4 numbers \n"); scanf_s("%d %d %d %d ", &a1,&a2, &a3, &a4); printf("The 4 numbers entered are %d %d %d …

Member Avatar for PhoenixInsilico
0
77
Member Avatar for rrreeefff

#include "stdafx.h" #include "stdio.h" [code=cplus] void swap (int a, int b); int main (void) { int a,b; printf("enter 2 positive integers"); scanf("%d",&a,&b); swap (a,b); printf("d%d,a,b\n"); } void swap (int a, int b) { int swap (a,b); } [/code] I have one error (20) : error C2078: too many initializers

Member Avatar for Denniz
0
83
Member Avatar for rugs267

I'm very very new to C so I'm having some trouble with this (and pointers): I'm trying to pass four parameters into a function: birthdayFunction(char birthday, int month, int day, int year); The birthday is the string input from the user (with "/" separating each field, ex. 7/23/76) and I …

Member Avatar for rugs267
0
107
Member Avatar for anny**

hi to everyone !!! anny here ,. i want to make a program using c which can calculate following functions :: [COLOR="red"][B][I]sin,cos,tan,+,-,*,/,iverse,log,ln,exp,sqrt,raise to power 100,10,2[/I][/B][/COLOR] plz plz if anyone can help me by giving me some idea about it and which is somthing of beginners level !! thanxx alot !

Member Avatar for ahamed101
0
176
Member Avatar for slow14

I'm trying to add a username, password, firstname and lastname on a text file. Everytime I run the program, it only accepts one username, password, etc. Can anyone please help? here's my code. [code=csharp] #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct { char UName[50]; char PWord[50]; char FName[50]; char …

Member Avatar for ahamed101
0
155
Member Avatar for dhingra

[code=c] void main() { int i,j; /*input values of i and j*/ while(i*j<0&&++i!=7&&j++!=9) { do something; } [/code]

Member Avatar for ahamed101
0
108
Member Avatar for Demonisya

Hello....everyone I want to ask you for your advice on what problem I'm gonna do.... So my teacher grouped us and make a program that we ourselves would make.... we can do that but what kind of program do we have to make, any suggestions???? My teacher said that the …

Member Avatar for Demonisya
0
99
Member Avatar for mgirl

:) Hi, Ive written a program that is supposed to count the number of people of different ages and calculate the average of valid ages. We exclude ages entered as 0, over 130 or negative. The program does run but I sometimes don't have the right number in the different …

Member Avatar for Ancient Dragon
1
90
Member Avatar for jared_masc

Iam meant to implement 3 methods that do the same thing differently to read in a string and the string that is read from the keyboard must be terminated with an end-of-string character. Also, it should not contain any new line character. iam supposed to use fgets(), getchar() and scanf(); …

Member Avatar for stilllearning
0
120
Member Avatar for shrikara

this is my code I am using in Unix machine, using cc compiler: [code=c] #include<stdlib.h> main() { int nr=0,nc=0; printf("Enter number of coulmns:"); scanf("%d",&nc); printf("Enter number of rows:"); scanf("%d",&nr); int *x,temp; printf("Enter the matrix:\n"); for(int i=0;i<nr;i++) { for(int j=0;j<nc;j++) { scanf("%d",&temp); *(x+i*nc+j)=temp; } } for(int i=0;i<nr;i++) { for(int j=0;j<nc;j++) { …

Member Avatar for kenji
0
130
Member Avatar for danibootstrap

Hi, I want to write a simple code to change the mouse pointer position.Like I enter the value of X and Y and the mouse pointer should get positioned to that co-ordinates.What are the specific functions that I need to use to set mouse position and get mouse position?I searched …

Member Avatar for danibootstrap
0
118
Member Avatar for it2051229

I'm looking for the header file of shm.h , although i've seen some on the web but when i use it the prototype methods are not implemented.... where can i download the full shm.h?

Member Avatar for Salem
0
116
Member Avatar for Stella01

why we use different libararies in C can some one PM me all Libararies ?

Member Avatar for Dave Sinkula
0
97
Member Avatar for jared_masc

Hi, iam writing a pig latin program with 3 different methods i dont knw understand the error that iam gettin in the code here's the code: [code=c] #include <stdio.h> /*Include the standard I/0 header file */ #include <string.h> /*Include the standard I/0 header file string library */ //The functions that …

Member Avatar for stilllearning
0
240
Member Avatar for En-Motion

i need to get a printout of a c program running using dos-redirection. Does anyone know how i can redirect the output to a texfile so i can print it?

Member Avatar for ahamed101
0
296
Member Avatar for tondet2

attempt to display an electricity bill that looks, for example, like this: ********************************* Present meter reading 6015 previous meter reading 5899 Units used 116 Rate per unit 6.73 pence Standing charge £7.78 The sum due is £15.59 ********************************* This program displays an electricity bill, given a present meter reading and …

Member Avatar for ahamed101
0
87
Member Avatar for ahamed101

Hi Everyone, I know conio.h is not available in Unix. I want to use getch(). Using curses.h needs causes the screen to clear which I don't want. I found a code snippet (source : internet) using termios, it works, the thing is I need to press enter/or any other key …

Member Avatar for ahamed101
0
1K
Member Avatar for jared_masc

Hi, i'm really new to programming in C, and iam kind of stuck on this problem, the question is [B] Write a C function to print out an integer value in base 4 (using only the digits 0, 1, 2, 3). Use this function to write a program that reads …

Member Avatar for ArkM
0
111
Member Avatar for rrreeefff

Hello, I am working on a non-recursive function that computes a to the power n. I have one error which is cpp(23) : error C3861: 'mypower': identifier not found [code=cplusplus] #include "stdafx.h" #include "stdio.h" double power(float a, int n); // function prototype// int main (void) { float a; int n; …

Member Avatar for devnar
0
496
Member Avatar for RouseA

I am trying to define peripheral ports in an embedded application as variables at fixed addresses (e.g. PortA is at address 0x10010). I could do this using #define: #define PortA *(u32*)0x10010 However, this wouldn't allow me to view the value of PortA in a watch window when debugging, since there …

Member Avatar for Salem
0
148
Member Avatar for totalnoob

Hi! As you can see by my name I'm new to programming. I have a program that only works partially. It consists of two functions. One function creates a text file and reads it and the other one creates a binary file and reads it. The text file part works …

Member Avatar for totalnoob
0
76

The End.