15,551 Topics

Member Avatar for
Member Avatar for newcoder777

Hi everyone, can somebody guide me to produce very small delays for controlling a servo motor using PWM. I need to generate 3 different pulse widths of 1.2ms , 1.5ms and 1.8ms. I am using Keil compiler, and 8051 microcontroller. I am a good C coder, but dont understand much …

Member Avatar for newcoder777
0
284
Member Avatar for nada massoud
Member Avatar for abhimanipal
0
31
Member Avatar for yasemin

Hi, Im having trouble dealing with text files in C. I want to be able to move through the text file which Ive used fseek(). But how do I read one character or read a line of characters from the position I want and change these to float? Thanks in …

Member Avatar for abhimanipal
0
127
Member Avatar for sdinu96

I want database management in C To ADD,LIST,DELETE,INSERT using structures and files..........not in linked list.............. can anyone help me out....because this is the first time to do long and some what complex program for me

Member Avatar for abhimanipal
0
5K
Member Avatar for device

I want to take out words that reoccur in array1 and put them in array3. (so in array 3 there would be only distinct values) the problem is.. i dont understand how the count2 value can reach so high. (over 300) but should be 20 maximum. [code=c] for(i=0; i<count;i++){ if(count2==0){ …

Member Avatar for WaltP
0
90
Member Avatar for iwanttolearnc

im trying to use c to interface with a zilog microcontroller. the problem is that i cant do much without the library <ez8.h>. ive been searching the web now for any links to download this particular library to no avail. does anyone know where i can get this library? thanks …

Member Avatar for iwanttolearnc
0
154
Member Avatar for learnerAccess

[code = c] #include <stdio.h> #include <string.h> int main() { int n = 0x000000FF, i; char *p = (char *)&n; for(i = 0; i < sizeof(int); i++) printf ("value : %d\n", *(int *)(p + i)); return 0; } [/code] I'm expecting something like 255 0 0 0 OR 0 0 …

Member Avatar for learnerAccess
0
88
Member Avatar for littlestewie

[CODE]#include <stdlib.h> #include<iostream> #include<conio.h> typedef struct kume1{ int data; struct kume1 *next; }; typedef kume1 *kume1ptr; void insert(kume1ptr *x,int a); void del(kume1ptr *x); int main(){ int t=1; kume1ptr first1=NULL; kume1ptr first2=NULL; int x; int i; for( i=10;i>=1;i--)//ikisi içinde 20 şer tane random sayı üretiyoruz { x=rand() % 100 + 1; …

Member Avatar for abhimanipal
0
100
Member Avatar for toddermohan

[CODE]#include<stdio.h> main() { FILE *fp; fp=fopen(*PR1.c","r"); if(fp==NULL) { puts("cannot open"); exit() } }[/CODE] -------------- in this program why they are using *fp and pl reason full program.. and also how fp=fopen(*PR1.c","r"); works

Member Avatar for Radical Edward
0
115
Member Avatar for toddermohan

[CODE]FILE *fp fp=fopen ( const char * filename, const char * mode ); //// or //// FILE * fopen ( const char * filename, const char * mode );[/CODE] if i am asked to say "how u say?" in c language like direct command line code or what.. they say...

Member Avatar for tesuji
0
116
Member Avatar for tdk420n

Hi. I'm having a little trouble figuring this problem out. What I need the program to do is take an email inbox and print out only the Headers for each message. Assuming each max line length to be 1024. I can read the file line by line but I don't …

Member Avatar for tdk420n
0
191
Member Avatar for speedy94519

Hey guys Im having trouble printing out a string. Could someone help me out? I would like to enter a string like: "julie perez" and print out "julie perez" but my program only outputs "julie". The code that prints out only "julie" is the following: practice.c: [CODE] #include <stdio.h> #include …

Member Avatar for speedy94519
0
139
Member Avatar for Kombat

So what I want the code to do so far is take an expression lets say 35x + 17y = 5 and break it down into three values, 2 integers and a character. 35, 17, and + so I can tell it how to evaluate it. Here is my code …

Member Avatar for Radical Edward
0
100
Member Avatar for gameon
Member Avatar for Radical Edward
0
198
Member Avatar for mithunp

Trying to implement a stack using dynamic array. The Problem which i am facing is that if i a pushing 60 or 90 elements then the program is running fine but on inserting say 600 elements while printing the first two elements are showing junk value. Compiled the code using …

Member Avatar for Radical Edward
0
151
Member Avatar for Fr33t

I don't normally post in these kinds of forums and prefer to just google my way through problems, but after 3 hours of trying to solve this, I am beat. I am working on a program that uses a linked list and can add/delete/print out nodes (orbs in this program) …

Member Avatar for Banfa
0
220
Member Avatar for NH1

DOSRetCode = GetOpenSaveFile(►TARGET{PROP:Handle},►DOSDialogHeader,DOSTargetVariable,►DOSExtParameter ,DOSFileNameVar,1,►0) Where the black arrow is, thats where i get my error. the error says "No matching prototype available" i also get two more errors where the other black arrows are after the first one, they are, "Invalid variable data parameter type" And the last one is, …

Member Avatar for nbaztec
0
100
Member Avatar for muthu1802
Member Avatar for Ancient Dragon
0
189
Member Avatar for notdoppler

Hello Community i am using Linux (fedora) gcc compiler. Normally i use Java but for the Interprocess communication part we got C. My problem specifically is that when I read from a file with the fread() function and save it in a char buff[somesize] I cant use printf() to display …

Member Avatar for abhimanipal
0
258
Member Avatar for xaop

I need to create a program for reading two numbers,printing them,confirming them and then summing them up. Here is my attempt [CODE]#include <stdio.h> #include <conio.h> void main() { clrscr(); int a,b,s; char c,d; s=a+b; printf("Enter any two numbers "); scanf("%d %d" , &a, &b); printf("The numbers you have entered are …

Member Avatar for abhimanipal
0
131
Member Avatar for Savage221

Hello, I had a question regarding nested structures. Lets say you *have* to use the following structures: (disregard the numbers thrown in, I just tossed random numbers in). [CODE] typedef struct info{ char name[20]; char address[50]; char serial[15]; } PERSONAL; typedef struct person{ PERSONAL individual[50]; int number; } PERSON; [/code] …

Member Avatar for karthikeyans
0
266
Member Avatar for Alerwiali

Hello ..i am trying to get the factorial of large integers but i get 0 every time i try,,can anyone tell me why ,,,Thanks in advance . [CODE]#include<stdio.h> #include<conio.h> int factorial(int n); //main main() { int x,fact; printf("Enter a positive interger \n"); scanf("%d",&x); fact=factorial(x); if (fact==-1) printf("the number is not …

Member Avatar for Alerwiali
0
111
Member Avatar for TrustyTony

Do you know that there is clean way of doing what C-language ternary operator ? does in Python's recent versions. It is if with special twist. The syntax is: [CODE]'The value if true' if <condition> else 'Value when false'[/CODE] Values can be any type. You can put this structure to …

0
1K
Member Avatar for darkdai

hi can anyone tell me how to write the output of this code to a file?? [CODE] #include<stdio.h> #define MAX 10 char array[MAX]; void main() { void addvalues(); addvalues(); } //funtiocn that will allowe the user to add the values void addvalues() { printf("------------------------> Insearting List Elements <---------------------------\n"); int i; …

Member Avatar for Aia
0
148
Member Avatar for joe_adelmo

Hi, I have to somehow modify a C-code by introducing a new array. We are in the chemical field: I have a small molecule (guest) inside the structure of a larger one (host). The existing array stores the square of the distance between a specific class of atoms: they are …

Member Avatar for Banfa
0
117
Member Avatar for manutd4life

Hello everyone, i need to enter a value into a savings account paying 7% interest and €1,000 is withdrawn from the account at the end of each year. How many years are required for the savings account to be depleted? here's wat i did, but the loop not working: [code=c]#include …

Member Avatar for Tellalca
0
90
Member Avatar for gkaykck

[CODE] char in[100], *temp[10],var[10][10]; int i, n = 0,fulval=0; double val[10]; var[10][]="ANS"; [/CODE] it should be simple but i cannot figure it out. I want to assign "ANS" to var[0][0,1,2] but it did not work?

Member Avatar for gkaykck
0
89
Member Avatar for fenerista

İs it possible now to use a system call in module programming ? after I "make" the module below I am getting warnings like that no errors WARNING: "sys_getcwd" [/home....mod/mod01/mod01.ko] undefined! [code] /* * hello-5.c - Demonstrates command line argument passing to a module. */ #include <linux/module.h> #include <linux/moduleparam.h> #include …

Member Avatar for fenerista
0
202
Member Avatar for yuvaraj.ragupat

Hi All, Can anybody explain here what is the different between normal function call and function to pointer call? How function to pointer is working internally? Why should we use function to pointer in call back? why not we call function call directly? Please pardon me ,if it is very …

Member Avatar for griswolf
0
996
Member Avatar for aliiya

hello hey i want to implement a program in c or c# for preemptive processor sharing tasks. can anyone plz help me out???

Member Avatar for s_sridhar
0
70

The End.