Search:

Type: Posts; User: Player777

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    120

    When we should avoid use of volatile

    volatile means value of variable may be change at anytime

    In example, compiler know that foo is set to 0 and compiler will never look into while loop but by external even when foo become 1 then...
  2. Can the extern be used only in the different...

    Can the extern be used only in the different source file or can it be used in the same source file?
  3. Thank you ! The program gives me the output that...

    Thank you ! The program gives me the output that I wanted But my understanding has been failed to understand the extern keywords

    I though if any variable is declared in function and If we want to...
  4. I do not understand your answer program should...

    I do not understand your answer program should supposed to give result 3 but it's give error so how to get result 3
  5. How to use variable in main function that is declare in other function ?

    If I want to use variable in main function that is declare in another function so How to do that, for example x is declare in function foo but I want to use it in main function so I am making it...
  6. what is difference between global extern variable and local extern variable ?

    I am not clear about the life time and scope of global extern variable and local extern variable

    extern may be local or global. What is difference between local extern and global extern...
  7. Thank you salem modified version int...

    Thank you salem

    modified version



    int a; //Global variable


    static int b; // Static Global variable
  8. what is difference between global variable and static variable in the context of life

    I am not clear about the life time of global variable and static variable I think both initialize only once and stay alive for life time of program

    what is difference between global variable...
  9. Replies
    3
    Views
    115

    Thanks okay but I don't understand the reason...

    Thanks okay but I don't understand the reason behind this why we can't use short /long with char ?

    as I know if we want to modify the size of variable we can use modifier short, long
  10. Replies
    3
    Views
    115

    short char and long char

    Hi

    int variable take four byte, short int take two byte and long int take eight bytes

    the same char takes one byte so long char should be take 2 bytes

    so I wrote program to get result

    ...
  11. Replies
    3
    Views
    146

    #include union example { int...

    #include <stdio.h>

    union example
    {
    int x;
    char y;
    float z;
    };
  12. Replies
    3
    Views
    146

    How union occupy memory

    I have been through various tutorials but I do not understand how union member occupy memory


    #include <stdio.h>
    union example
    {
    int x;
    char y;
    float z;
    };
  13. Replies
    2
    Views
    261

    calculator program

    I wrote my code for calculator


    #include<stdio.h>

    int main ()
    {
    int op1;
    int op2;
    int result;
  14. Replies
    1
    Views
    222

    increment operator

    What's the main difference between two operators in the codes


    #include<stdio.h>

    int main ()
    {
    int A = 1;
    A++;
  15. Replies
    6
    Views
    273

    sorry now I understood what I was doing wrong

    sorry now I understood what I was doing wrong
  16. Replies
    6
    Views
    273

    I am confuse because there are so many way I do...

    I am confuse because there are so many way I do not understand how you counted row.


    #include<stdio.h> int main()
    {


    int array [2][3][4] =

    {
  17. Replies
    6
    Views
    273

    so int array [2][3][4] -> 2*3*4 = 24 elements...

    so int array [2][3][4] -> 2*3*4 = 24 elements


    { {1, 2, 3}, { 4, 5, 6} }, // 6 elements { {11, 12, 13}, {14, 15, 16}, {17, 18, 19}},// 9 elements
    { {10, 20, 30, 40}, {50,...
  18. Replies
    6
    Views
    273

    excess elements in array initializer

    Can anyone tell what warning the compiler is giving and how to overcome it?


    warning: excess elements in array initializer
    { {10, 20, 30, 40}, {50, 60, 70, 80}, {90, 100, 110, 120}},
    ^
    note:...
  19. Replies
    4
    Views
    303

    If the string is constant, so const is not...

    If the string is constant, so const is not written in the code anywhere. How do you know the string is constant
  20. Replies
    4
    Views
    303

    Can pointer directly store data

    I do not understand how the codes below work



    #include<stdio.h>

    int main ()
    {
    char * p = { "Hello"};
  21. Replies
    5
    Views
    460

    I am not too good in c language but I am working...

    I am not too good in c language but I am working on it by writing my own program.
    I develop logic on the page before writing the program.


    There is one logic error in code but I think program...
  22. Replies
    5
    Views
    460

    largest number in array

    I do not understand why my program is not finding largest number in array

    I am not getting any output when I run the code


    #include<stdio.h>
    int main (void)
    {
    int i, largest, size,...
  23. Replies
    6
    Views
    398

    How to store string

    If the user enters a string, I want to store it, like if I want to store someone's name, how can I do that?

    I tried to write a program but I am having some warnings. What might be the correct way...
  24. Replies
    9
    Views
    343

    Structure is a group of different data types and...

    Structure is a group of different data types and each element in a C structure is called member

    type int store integer value x = 12
    type char store charactr value y = 'K'
    type float store...
  25. Replies
    9
    Views
    343

    k&r c programming struct X{ int a; ...

    k&r c programming


    struct X{
    int a;
    int b;
    }


    int main ()
Results 1 to 25 of 66
Page 1 of 3 1 2 3