C/C++

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
Home » Tech Support »» C/C++
  • why it is not work?

    Hi: all:The code is like :char *data;data = malloc(1000);if (data = NULL){printf (" can not assign the memory for the packet\n");exit(1);}memset(data,'\0',1000);The code is failure say "Segmentation fault"The problem is memset, why?Thanks...

    5 answers | 339 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • STRING SIZE PROBLEM

    Hi I am a little bit new to C's advanced topics:I have Turbo C and I wrote a simple program to write data to file:#include<stdio.h>#include<dir.h>#include<conio.h>#include<stdlib.h>// program to write a long string to a filevoid main(){ FILE *pt;char *b;chdir("d:\\te...

    4 answers | 882 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Is there any way in C to print ?

    "Jordan Abel" <jmabel@purdue.eduwrote in messagenews:slrndnlop7.qg3.jmabel@random.yi.org2005-11-16, Lew Pitcher <lpitcher@sympatico.cawrote:>Sandeep wrote: Clark S. Cox III wrote: 2005-11-15 12:10:43 -0500, "Sandeep" <sandeepsinghal@gmail.comsaid:Being more generic, you can lookup th...

    3 answers | 1548 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • How to get my homework done

    Hi, I am a lazy cheat that does not want to know how to write C programs.I need the members of this newsgroup to complete all my homework assignmentsfor me.My teacher really does not care where I get the answers or even if Iunderstand them.So, please can you experts just do the work for me and n...

    15 answers | 411 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Evaluate string expression in if statement?

    Is there anyway to literally evaluate the contents of a string in an ifstatement?For example:int i = 0;char * str = "i == 0";if(str) /* I know this doesn't do what I want */{}would be the same as:int i = 0;if(i == 0){}The general application is that I'm in interested in reading ifcondi...

    8 answers | 568 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Explain why this prints the same

    Hello, I'm trying to help someone on a linux-oriented forum. I've takenhis original code and cleaned it up, but I am still wondering aboutsomething. Here's the code:#include <stdio.h>intmain(void){int a[][3]={ {1,2,3},{4,5,6,},{7,8,9} };int *b = (int *)a;int **c = (int **)a;...

    12 answers | 1018 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Reason for ISO ; warning

    [Warning] IS C does not allow extra ';' outside of a functionint n;;int main(void){}Anyone care to enlighten me as to why IS C does not allow this, butapparently ANSI c99 does?Ta...

    22 answers | 255 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Reason for ISO ; warning

    [Warning] IS C does not allow extra ';' outside of a functionint n;;int main(void){}Anyone care to enlighten me as to why IS C does not allow this, butapparently ANSI c99 does?Ta...

    0 answers | 255 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • Question about bitwise operators

    For some strange reason, I thought the following would give me a valueof 168, not 166. My reasoning was that 678 - 255 - 255 = 168.#include <stdio.h>int main(void) {unsigned long a = 678;unsigned long ff = 255;unsigned long c = a & ff;printf("The value is: %u \n", c);return 0;}The value is...

    10 answers | 449 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • How to read an integer one by one?

    Hi,How can I get a digit from integer for example, 12311, one by one forcomparision?Thanks!...

    13 answers | 130 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • How to convert integer to string array without specify array size?

    Hi,How can I convert integer, for example 12113, to char array but withoutspecify an array size in C programming?Thanks!...

    6 answers | 159 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

  • FILE HANDLING

    Hi I am a little bit new to C's advanced topics:I need help in file handling.I have Turbo C and I wrote a simple program to write data to file:#include<stdio.h>#include<dir.h>#include<conio.h>#include<stdlib.h>// program to write your name to a filevoid main(){ FILE...

    3 answers | 768 bytes | related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg

SPONSORED
QUESTION
SPONSORED
EMSDN