15,552 Topics

Member Avatar for
Member Avatar for shankarz
Member Avatar for sourabhtripathi

[CODE] int a[10]={3,45,6,78,89,334,4,77,54,60}; int *p=a; [/CODE] what will *p++ do ? as ++ has more priority than * therefore ++ will be executed fisrt ? but its postincrement so it will happen after change of line or statement. so will it increment the pointer or increment the value hold by …

Member Avatar for jaaz....
0
304
Member Avatar for Coffee198

I am having trouble with my homework problem is: float total = 200; int - 1; for (i=1; i,=5;i++) { total=total/2 } print total: need output and flow chart Any help please?

Member Avatar for griswolf
0
108
Member Avatar for War_Archer

I wrote a code with fork() but I keep on getting the problem undefined reference to fork(). I know my code works 100% because I run it on my school computer and it works. How do I fix this problem? I use code blocks IDE with GCC compiler and GDB …

Member Avatar for War_Archer
0
2K
Member Avatar for nosson

I'm having trouble dividing two elements of an array.... it seems to work in some instances, but not right now... I have two matrices[row][col] sized and am trying to transpose the elements to a matrix to a vector/array. That all works fine... but when I then try to divide the …

Member Avatar for WaltP
0
168
Member Avatar for al3x748769

i am new to C and i am trying to learn more as i am taking a basic class. we started out with basic programs and now we are making a tic tac toe board. i was wondering what a 8 bit binary counter would look like. i know the …

Member Avatar for viwenka
0
145
Member Avatar for dapcigar

Description of tasks: You are required to write a program that will calculate the total marks and the grade the student obtained on a multiple choice test paper. There are 20 questions and each question has an option A,B,C and D. Total of 30 students took the test. The correct …

Member Avatar for Adak
0
333
Member Avatar for shirmaster

This is my code and i do understand the logic but i don't understand the algorithm. About the Parking time coz when i give 1:26 in the time in and 2:20 in time out, i got a negative parking time. here's my code [CODE]#include<stdio.h> void menu(char a); void getData(int *a, …

Member Avatar for kings_mitra
0
153
Member Avatar for rampraveen

#include "stdio.h" #include "conio.h" #include "graphics.h" char far *vidmem=0xB8000000; main() { int gm,gd=DETECT; int r,c,i; char message[]="praveen"; initgraph(&gd,&gm,""); clrscr(); for(r=5;r<=20;r++) { for(c=5;c<=50;c++) write2vdu('',64,r,c); } c=10; for(i=0;i<=10;i++) { write2vdu(message[i],77,10,c); c++; } getch(); } write2vdu(char ch,char attr,int row,int col) { char far *v; v=vidmem+row*160+col*2; *v=ch; v++; *v=attr; } when i run this …

Member Avatar for Adak
0
142
Member Avatar for dy/dx

hi. we have this project, and we have to open a file where we will get what we need to evaluate. The problem is I can't move on to my project because the eclipse (using mingw compiler) can't build my source code. Here's my source code: [CODE]#include<stdio.h> #include<ctype.h> #include<stdlib.h> #include<string.h> …

Member Avatar for kings_mitra
0
181
Member Avatar for csmgsarma

Hi all, Here is a code snippet that is bugging me off for a while: [CODE] #define size (20 * 1024) unsigned char data_base[size]; /*my application here*/ ......... ......... ......... ......... [/CODE] The global variable "data_base" as you can see is uninitialized. The executable size was 434KB. when this variable …

Member Avatar for gerard4143
0
1K
Member Avatar for libathos

hi guys i want to make a c program,what it has to do is to find its current pathname every time it is executed from diferent locations and then redirect the outcome in a .txt file,through cmd.I have lack of knowledge when it comes to cmd so any help?

Member Avatar for kings_mitra
0
127
Member Avatar for archana.c07

Hi all, I am trying to conver string to decimal. the sting is 8 byte long and contains data as hex nembers e.g 0000000000000D72 i want to conver this data into decimal as 3442 i'm not getting how to do this help me...

Member Avatar for Software guy
0
258
Member Avatar for suvind

[B]When should we use for loop and when while in C ? In terms of speed up and memory consideration in embedded systems.[/B]

Member Avatar for Dervish1
0
2K
Member Avatar for fussballer

Hello, I was compiling some code and get the following compiler errors: error C3861: '_stprintf_s': identifier not found error C3861: '_tcscat_s': identifier not found I got the code from the MSDN Library: [URL="http://msdn.microsoft.com/en-us/library/dd798640%28VS.85%29.aspx"]http://msdn.microsoft.com/en-us/library/dd798640%28VS.85%29.aspx[/URL] I tried to find some info about the _stprintf_s and added the header <tchar.h> This got rid …

Member Avatar for fussballer
0
516
Member Avatar for rapids79

Hi..I want to create a message box that displays the string from an array. Is it possible using MesasgeBox()?? I have tried passing the name of the array to the function but I looked around and found youd could pass only string to the function. So waht is the solution??? …

Member Avatar for Ancient Dragon
0
142
Member Avatar for shinsengumi

can anyone help me make a C program code that will open an image file? i'm using C language and GUI/glade3 alongside it. to help you visualize it, i want to type the image filename in a text view entry and when i click a button (Load for example) the …

Member Avatar for shinsengumi
0
222
Member Avatar for rapids79

Hi, As per the code snippet: [CODE]typedef struct TimeSlotConfigurationList_LCR A { A_SEQUENCE_OF(struct B) list; asn_struct_ctx_t _asn_ctx; } A_t; #define A_SEQUENCE_OF(type) struct { type **array; int count; /* Meaningful size */ int size; /* Allocated size */ void (*free)(type *); } typedef struct B { TimeslotNumber_LCR_r4_t x; ENUM{Yes(0), No(1)} y; ENUM{Ok(0), …

Member Avatar for rapids79
0
126
Member Avatar for fizzle

Hi all, I'm completely new to C but have dabbled with Bash scripting before. I've been trying to get my head around pointers etc. I have a small routine to check for the existence of a string in a file and print to screen, I claim no originality it's a …

Member Avatar for fizzle
0
163
Member Avatar for Shikhin

Hello, I am trying to make a program which will sort a array of 10 elements using bubble sort. I searce dthe forum and google but douldnt find a problem similar to mine. I cam up with the following code: [CODE]#include <stdio.h> #include <stdlib.h> void swap(int *, int *); int …

Member Avatar for Shikhin
0
89
Member Avatar for rapids79

Hi..I am writing a server code for TCP/IP. The code is: [CODE]#include<winsock2.h> #include<windows.h> #pragma comment(lib,"user32.lib"); #include<stdio.h> #include<string.h> #include"tcpip.h" /*Function definitions for communication over TCPIP*/ /*Parameters for TCP/IP Communication*/ WSADATA wsaData; WORD version; int error = 0; SOCKET server_addr; SOCKET client_addr; struct sockaddr_in Start_Server; int length = 0; char tcp_ip_recv[20]; char …

Member Avatar for rapids79
0
264
Member Avatar for cktbrd

I have been away from c for awhile and was hoping that someone could guide me on how to code the following: I have a string for the time that is in the format hhmmss.sss (hour, minute, seconds, fraction of seconds). I would like to parse the string and store …

Member Avatar for kings_mitra
0
258
Member Avatar for mamashi

I have a small problem. I am a begginer in C programming . I need so help please. my project i am working on is in image. I use a camera to take a number in very small part for example ( 0901) but sometime those component have defect next …

Member Avatar for abhimanipal
0
145
Member Avatar for SHENGTON

Hello, good evening. :) I got some problems with the "Bubble Sort" and "Selection Sort". My "Insertion Sort" is already ok. I just can't figure it out with this problem. Hope you can help me with this and explain it to me my mistakes. Here's the whole code: [CODE=C]#include<stdio.h> #include<conio.h> …

Member Avatar for Adak
0
127
Member Avatar for suvind

I have a statically allocated memory chunk and one dynamically allocated. Which one is preferable if a cache friendly function is to be written ?

Member Avatar for Ancient Dragon
0
25
Member Avatar for plike922

i am having trouble fixing this program... its not printing the number any tips??? i am using sieve of Eratosthenes [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" #include <iostream> using namespace std; int main() { bool is_prime[300]; int num[300]; int i, n; printf("This program prints all prime numbers from 1 to …

Member Avatar for technology
0
129
Member Avatar for xaop

I'm planning to design a program such that any number entered will be divided by all the numbers less than it and if any of the division gives 0 as the reminder,it is not a prime.Here is my attempt so far and iam not able to proceed after that.. [CODE]#include …

Member Avatar for technology
0
731
Member Avatar for aianne

Hello, I'm almost completely useless at C, and as part of a project I've got to conjure up a programme, and I'm just hoping someone can give me push to get it started. I want to make a programme where the user can draw a CIRCLE, SQUARE, LINE and POLYGON …

Member Avatar for jhamelberja@yah
-3
155
Member Avatar for vovasquez

ok so i know how to program in JAVA.. i am trying to learn C but the language is pretty confusing.. so i want to read from a file.. i created a FILE, numbers.txt ---> this file has int values. i have code to read the file, now i am …

Member Avatar for abhimanipal
0
99
Member Avatar for Green Anorak

Hi All Can anyone tell me how to read a file but only print to the screen certain parts of it? Below is what I've got already - apologies if it's very basic, I'm new to this! All I can do is get a program which prints the whole file …

Member Avatar for Ancient Dragon
0
83

The End.