15,552 Topics
| |
I'm supposed to ask the user to enter a number of marks, and to decide what each mark is. Then my program is supposed to find the min and max in the array, so far this is what my code looks like: [CODE]#include <stdio.h> void findMinAndMax(int arrayMarks[], int numOfMarks) { … | |
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 … | |
i want know the code how i enter password and appear on screen as ***** | |
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 … | |
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 | |
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){ … | |
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 … | |
[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 … | |
[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; … | |
[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 | |
[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... | |
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 … | |
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 … | |
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 … | |
hey do u know how to create shortcut for a file using c programming. | |
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 … | |
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) … | |
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, … | |
what is the difference between declaration of a variable and definition of symbolic name in c language? | |
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 … | |
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 … | |
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] … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
[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? | |
İ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 … | |
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 … |
The End.