Search:

Type: Posts; User: Player777

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    443

    I want to reverse them in place Imagine...

    I want to reverse them in place

    Imagine numbers are stored as following

    0x00 = 1
    0x01 = 2
    0x02 = 3
    0x03 = 4
    0x04 = 5
  2. Replies
    4
    Views
    443

    reverse number printing

    I have written program that suppose to print reverse number for given size


    #include<stdio.h>

    int reverse ( int *p, int a[5])
    {
    int i = 5;
    for ( i = 5; i > 0; i--)
    {
  3. Replies
    2
    Views
    995

    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...
  4. 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?
  5. 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...
  6. 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
  7. 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...
  8. 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...
  9. Thank you salem modified version int...

    Thank you salem

    modified version



    int a; //Global variable


    static int b; // Static Global variable
  10. 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...
  11. Replies
    3
    Views
    995

    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
  12. Replies
    3
    Views
    995

    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

    ...
  13. Replies
    3
    Views
    1,121

    #include union example { int...

    #include <stdio.h>

    union example
    {
    int x;
    char y;
    float z;
    };
  14. Replies
    3
    Views
    1,121

    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;
    };
  15. Replies
    2
    Views
    1,581

    calculator program

    I wrote my code for calculator


    #include<stdio.h>

    int main ()
    {
    int op1;
    int op2;
    int result;
  16. Replies
    1
    Views
    1,261

    increment operator

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


    #include<stdio.h>

    int main ()
    {
    int A = 1;
    A++;
  17. Replies
    6
    Views
    1,270

    sorry now I understood what I was doing wrong

    sorry now I understood what I was doing wrong
  18. Replies
    6
    Views
    1,270

    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] =

    {
  19. Replies
    6
    Views
    1,270

    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,...
  20. Replies
    6
    Views
    1,270

    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:...
  21. Replies
    4
    Views
    1,523

    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
  22. Replies
    4
    Views
    1,523

    Can pointer directly store data

    I do not understand how the codes below work



    #include<stdio.h>

    int main ()
    {
    char * p = { "Hello"};
  23. Replies
    5
    Views
    1,713

    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...
  24. Replies
    5
    Views
    1,713

    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,...
  25. Replies
    6
    Views
    1,784

    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...
Results 1 to 25 of 68
Page 1 of 3 1 2 3