15,551 Topics
| |
hello i am a student of sgrrits dehradun doing bca now a days my pointers chapter is going on its difficult to understand but mostly i did it but i want to know that how it is use ful for us in the c. i only find its 1 benefit … | |
Hi, im trying to calculATE DFT through this code, i dnt know what's wrong please enlighten. Thanks [CODE]#include<conio.h> #include <math.h> #include <complex.h> main() { int m,n,r,N,j; float l,o; float complex x[1000]; float real, imag; { for (m=1;m<=10;m++) { for (n=1;n<=10;n++) { for (j=1; j<=10;j++) N=1000; r=1/N; l=sin(3*j); printf("the value of … | |
I am trying to write a program that reads a string and shortens it if the letters are in a row. For instance abcdghigjhkhdf becomes a-dg-igkhkhdf. I want that it erases the ;etters it erases but it is not working. HEre is my code: [code] #include <stdio.h> #define MAXSTRING 100 … | |
Hi, Is there a way to write code or do functions exist for keypress down and keypress up of the keyboard.There are functions for mouseleft button down and mouse left button up.Is it possible with keyboard keys in windows?Like "Alt"+"F" etc... Any sample code or resource would greatly help.Thanks in … | |
hello guys, I get this error MSG and I can't understand what is the problem with my code. my program consist a menu with 5 options: 1. The program remove double digit from a given number. 2. The program rotate the first number to the right according to the second … | |
is it possible to put void function into loop statement? | |
Hi i'm trying to compile this code, but getting warning. need some help to understand what I'm doing wrong. void printGraph(FILE *out, GraphRef G){ out = fopen (out, "w"); if( out==NULL ){ printf("Unable to open file %s for writing\n", out); exit(1); } } warning: passing arg 1 of `fopen' from … | |
Hi , Is there a way that I can draw lines or circles etcc..(graphics) onto windows screen? Please let me know.Sample code would greatly help. | |
hi, Can any one help me about clock problem..i need to calculate the exact execution time of algorithm using the processor clock speed not the wall clock time..i am getting zero by using the clock_t function in time.h.also how can i calculate the exact processor speed execution of program..reply me … | |
[B]fseek()[/B] and [B]ftell()[/B] work only for files < 2,147,483,647 bytes [B]fseeko64()[/B] and [B]ftello64()[/B] from [B]<stdio.h>[/B] can deal with files up to 18,446,744,073,709,552,000 bytes the printf format for unsigned long long val is [B]%I64d[/B] eg. Obtaining the file dimension (this code was tested with [B]GNU GCC compiler[/B] (MinGW/Cygwin) from code::blocks) | |
Hi, I was wondering if anyone can help me translate this into java. Thanks [CODE]#include "Element.h" #include <stdlib.h> element * Element(int s1, int w1, double c1, int x1, int k1) { element * retval = malloc(sizeof(element)); retval->s = s1; retval->w = w1; retval->c = (float) s1 / (float) w1; retval->x … | |
stdio.h only includes function declarations. Where does the compiler look for the function bodies? | |
What is the method to remove dupplicate items from an character array?? A Sample Program is Here which take two arrays merge them and sort them please include some lines that should remove duplicates from an resulted array?? [code] #include <stdio.h> // A simple bubble sort void sort(char data[], int … | |
My code: [code] printf("\n"); printf("\tSlalom Race, Version 1.0\t\t\n\n"); printf("1. Play\n"); printf("2. Instructions\n"); printf("3. Quit\n\n"); printf("Your choice: "); scanf("%d", &choice); } /* Initializes loop to begin game */ while (choice != 3) { /* Begins execution of game and Selects instructions if needed */ while (choice == 1) { printf("You are … | |
Hi, i'm facing a weird behavior in this code that i just wrote. It was supposed to read a string from stdin and just write it out. I've debugged it and for me it reads perfectly, but in the while (line 38), *p just seems to be taking weird chars … | |
Hi, I want to write code for opening an external file or program from the C program.Could anyone tell me how to do this? Say if I want to open calculator.exe I mention the path in the program and it should open it or say if I want to open … | |
How to print this pattern use "for" ??? [IMG]http://ser1.share.ysk.cc/upload/photo/20091112/754158.JPG[/IMG] :?::?::?: | |
I've written a method that takes a variable number of arguments. My problem is that the method is supposed to do one thing if there is only one argument, and something different if it recieves multiple arguments. If it's one argument I'm supposed to get info from a global variable, … | |
Hi, I would like to make a database with users. But I take errors in the function Could someone help me please? My code is : [CODE]typedef struct user user; int id2=0; struct user { char name[20]; char last[20]; int id; }; int function(user* users, int id, char name[], char … | |
Hello, [code] #include <stdio.h> int main(void) { enum BOOL {foo, bar}; enum BOOL bFlag; return 0; } [/code] When I compile this and run it AntiVir claims it's the TR/Eplx.IMG-WMF.bfg trojan. Isn't that weird? | |
dearest i want to make a program in which i want to move a "%" to each side of a screen so how could be made please help earlier | |
In an assignment for class we have to ask the user how many characters they'd like to enter and then read the characters into an array of that size. I've had problems with calling a function to do this. I will also be passing this array to other functions, so … | |
Hi, I need your help for my program. My code is : [CODE] void user() { char str[15]; int i=0; do{ printf("\nPrint str.\n"); fgets(str,15,stdin); i = strlen(str); }while(i>15); } void menu() { printf("Press :\n"); printf("0. \n"); printf("1. \n"); printf("2. \n"); } int get_choice() { int choice = 0 ; const … | |
Hi, I'm new to this site so apologies for any mistakes. I'm trying to write a program to parse string from a file. In each string I then have to parse the different strings for example: add h'13', 4 So I've to parse the 'add' bit, the '13' bit and … | |
The famous Tower Of Hanoi with graphics and animations. | |
I am suppose to make a MakeFile for the 2 source files named p4a.c and p4b.c Am i doing this makefile correctly? Any suggestions would be so helpful my MakeFile so far [CODE].SUFFIXES: .c .o CC - gcc CFLAGS = -g .c.o: $(CC) $(CFLAGS) -c $, sample: p4a.c p4b.c gcc … | |
hello I need a programm In C how convert Hexadecimal to decimal plz | |
If I am fread()'ing through a file and want to append it when i find a particular item, can i just do an fwrite() when i find it or do i have to first fseek() to that location and then do an fwrite()? | |
[B]Given an array of elements. An element is called as a leader if it is greater than all the elements to the right of it. Print all the leaders in O(n)?[/B] The following is my approach.Can anyone tell me how to improve the code and also the current time complexity? … | |
I am trying to run this program but it is giving "unable to open socket" eror. i am running this program on a server via putty which is hosted in my univerity server with wireless network. the code is : [code=c]#include <pthread.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <stdlib.h> #include <sys/socket.h> … |
The End.