Search:

Type: Posts; User: abhi143

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    125

    As much as I have seen, we keep the micro in the...

    As much as I have seen, we keep the micro in the header file. So I created two files main.c other.h

    What could be best example for #ifdef, #if, #defined, #else and #elseif directives ?
  2. Replies
    5
    Views
    125

    I do not understand what should be in main...

    I do not understand what should be in main function that's why left main empty. I don't found complete code that's why tried with my own code
  3. Replies
    5
    Views
    125

    How to use conditional?

    I have seen in many link there is more theoretical description about preprocessor

    C Preprocessor and Macros


    I want to experiment by writing some code


    #include <stdio.h>#include "other.h"
  4. Replies
    5
    Views
    208

    What you said in post 2 is given in page integer...

    What you said in post 2 is given in page integer types" table

    suppose we want to store number -32768 to 32767


    #include<stdio.h> int main(void)
    {
    short a = 32767;
    printf("max...
  5. Replies
    5
    Views
    208

    That information given on this page C syntax -...

    That information given on this page C syntax - Wikipedia




    Size qualifiers – short, long
    Sign qualifiers – signed, unsigned
    Data types - int, char, float, double

    <Sign qualifiers >...
  6. Replies
    5
    Views
    208

    Variable size and range

    I am having trouble to understanding this combination to store variable. I do not understand which one should be use for specific reason
    let's suppose if I want to store integer number then I...
  7. Okay so I will leave it here I was looking...

    Okay so I will leave it here

    I was looking some sample to create basic scheduler in c programming.
  8. I am trying to run code given in the example...

    I am trying to run code given in the example GitHub - EmbeddedApprentice/TaskTurner: A first, very short beginning for the TaskTurner.

    When I unzip folder I get only three file taskrunner.h...
  9. laserlight I did changes #include...

    laserlight

    I did changes

    #include<stdio.h>
    //#include "../include/errors.h"
    #include<windows.h>
    #include "../include/tasks.h"
    #include "../include/taskrunner.h"
  10. I need help to run sample code from internet

    I am trying to run sample code on my PC

    I have following three files taskrunner.h task.h runtask.c


    #ifndef TASKRUNNER_H#define TASKRUNNER_H
    int taskrunner(Task * TaskList, unsigned int...
  11. Replies
    8
    Views
    401

    This code compile #include ...

    This code compile

    #include <stdio.h>
    #define PI 3.1415
    main()
    {
    printf("%f",PI);
    }

    but I want to use #define pre processor directive in program
  12. Replies
    8
    Views
    401

    #define directive

    I am trying to use #define in program

    found page Preprocessor Directives - C Programming
    other.h

    #define PI 3.1415

    main.c
  13. Hi Hodor I am struggling to compile code. Can...

    Hi Hodor

    I am struggling to compile code. Can you help me to compile code given in this link GitHub - EmbeddedApprentice/TaskTurner: A first, very short beginning for the TaskTurner.
  14. gcc -Wall -o main main.c other.c yes this...

    gcc -Wall -o main main.c other.c

    yes this command also work on windows
  15. Thank! Hodor Finally I got working. yes I am...

    Thank! Hodor

    Finally I got working. yes I am working on windows 10

    gcc -o main main.c other.c

    C:\Users\Vij\Desktop>main
    3
  16. Here is complete file with path ...

    Here is complete file with path

    C:\Users\Vij\Desktop\other.c


    #include "other.h"
    int getnumber(void)
    {
    return 3;
    }
  17. I have replaced this file other.h #include...

    I have replaced this file

    other.h

    #include "other.h"
    int getnumber(void)
    {
    return 3;
    }
    error is same
  18. undefined reference to `getnumber' collect2.exe: error: ld returned 1 exit status

    Hi All,

    How do I create a project using multiple source files?

    I understand the concept of including header files but I don't really know how to combine other source files.

    Here is what I...
  19. this page Data encapsulation - Wikipedia...

    this page Data encapsulation - Wikipedia say data hiding and encapsulation are the same

    I am confused because i don't see the solid difference between them. What do you they are different or same...
  20. How Encapsulation is different from data hiding

    Can anybody tell me How Encapsulation is different from data hiding ?

    I have gone through the book and google search but I do not understand how Encapsulation is different from data hiding
    ...
  21. Replies
    2
    Views
    176

    size of structure is 12 bytes and size of...

    size of structure is 12 bytes and size of structure member is 4 + 4 +1 = 9 but compiler allocate extra 3 bytes that's we call padding


    #include <stdio.h> struct point
    {
    int x;
    int y;...
  22. Replies
    2
    Views
    176

    how much memory structure take in code

    I am confused with structure size


    #include <stdio.h>
    struct point
    {
    int x;
    char y;
    }s1;
  23. yes Practice will make me perfect. I don't get...

    yes Practice will make me perfect. I don't get age in method

    How does it looks

    #include<iostream>using namespace std;

    class Dog{
    private:
    int age;
  24. if possible Can you give any hint How it should...

    if possible Can you give any hint How it should be ?
  25. I agree with you I have to spent some time on...

    I agree with you I have to spent some time on reading that's what I am doing

    Do you have any advice on my previous code. I wrote it myself so may be somewhere I am wrong
Results 1 to 25 of 113
Page 1 of 5 1 2 3 4