Search:

Type: Posts; User: vajra11

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. function pointer doesn't give expected output

    When I run code, function pointer doesn't give expected output



    #include <stdio.h>

    void foo ( void )
    {
    int a;
    a = 20;
  2. Replies
    1
    Views
    3,472

    sign, size, data type

    Hi

    if the register is 16 bit wide

    sign, size, data type


    #include <stdio.h>

    int main()
  3. Replies
    4
    Views
    4,289

    Thanks for making clear. A static function is...

    Thanks for making clear. A static function is accessible only within the file it is defined in. if we want to access from the another file then we have to make function extern
  4. Replies
    4
    Views
    4,289

    scope and life time of function

    I have mostly seen that the variable has a life time and scope.

    But does any function also have life time and scope ?


    #include<stdio.h>

    void fun (void)
    {
    printf("sleep \n");
  5. Replies
    1
    Views
    4,183

    how to print pattern

    Hi

    I want to print pattern something like

    7, 8, 9, 10

    4, 5, 6

    2, 3
  6. Replies
    8
    Views
    5,817

    I do not understand what you mean test.h ...

    I do not understand what you mean

    test.h

    #ifndef TEST_H_INCLUDED#define TEST_H_INCLUDED
    void Func();
    #endif

    test.c
  7. Replies
    8
    Views
    5,817

    There is no main function in your code It will...

    There is no main function in your code It will never run
  8. Replies
    8
    Views
    5,817

    How to make separate header file from code

    Here is my example code :


    #include <stdio.h>

    void Func() {
    static int x = 0;
    x++;
    printf("%d\n", x);
    }
  9. >account->balance? account is pointer to...

    >account->balance?
    account is pointer to structure that point structure member balance

    >account.balance
    account is not pointer variable that point to structure member balance
  10. #include #include struct...

    #include <stdio.h>
    #include<stdlib.h>

    struct Name
    {
    int account_number; // structure member type integer
    float balance; // structure member type float
    };

    int main ()
  11. You are declaring a normal variable while I was...

    You are declaring a normal variable while I was declaring a pointer,

    Now how we can store variable value in below code


    #include <stdio.h>

    struct Name
    {
    int account_number; //...
  12. Its means if the structure variable is a pointer...

    Its means if the structure variable is a pointer to structure type struct , it cannot store the value
  13. How pointer of structure store variable value

    I am trying to understand How pointer of structure store variable value

    This is my code


    #include <stdio.h>

    struct Name
    {
    int account_number; // structure member type integer
  14. Replies
    10
    Views
    8,032

    A little hard to understand What is the...

    A little hard to understand

    What is the similarity and difference between global and static variable ?

    similarity
    Both will variables will initialize once they will not create and destroy...
  15. Replies
    10
    Views
    8,032

    global vs static variable

    I see a difference between global and static variables These two variables do the same thing. But the theory says that these two are different

    #include <stdio.h>

    static int i = 0;


    ...
  16. Thread: empty queue

    by vajra11
    Replies
    5
    Views
    9,890

    No I haven't, How do I check weather my function...

    No I haven't, How do I check weather my function are correct or incorrect. I would need to other function two check queue. I wanted to make three function first empty queue, enqueue and dequeue
  17. Thread: empty queue

    by vajra11
    Replies
    5
    Views
    9,890

    next step, I have written code for en queue...

    next step, I have written code for en queue functions


    #include<stdio.h>
    #include <stdlib.h>


    struct Node {
    int data;
    struct Node *next;
  18. Thread: empty queue

    by vajra11
    Replies
    5
    Views
    9,890

    empty queue

    I want to write code for the function that create empty queue with no element


    #include<stdio.h>
    #include <stdlib.h>

    struct Queue {
    struct Node *first;
    struct Node *last;
  19. Replies
    1
    Views
    6,261

    How to add data to head and delete from tail

    How to create fifo queue ?

    I made this attempt


    #include<stdio.h>
    #include<stdlib.h>

    struct Node
    {
  20. What do you mean ?Can you give pseudo code ...

    What do you mean ?Can you give pseudo code

    Two pointers called FRONT and REAR are used to keep track of the first and last elements in the queue.
  21. okay This is linked list that can add new node ...

    okay
    This is linked list that can add new node

    #include<stdio.h>#include<stdlib.h>

    struct node{
    int Number;
    struct node *next;
    };
  22. What are steps to create queue with linked list

    What are the steps to create queue with linked list

    Step 1 : Create a new node
    Step 2 : Assign data to the data member of new node
    step 2 : if queue is empty go to step 3 else go to step 4...
  23. Replies
    2
    Views
    5,973

    8 bit bit wise operation

    I understand bitwise operator in c language we can get decimal, hex input from user

    Any idea how to get only 8 bit data from user to perform bitwise operations

    for examples

    0000 1111...
  24. Replies
    6
    Views
    5,763

    okay understood -> A reference must always...

    okay understood

    -> A reference must always refer to something. Null are not allowed
    -> A reference must be initialized when it is created
    ->once initialized it can not be change with another...
  25. Replies
    6
    Views
    5,763

    I tried to understand with my code pass by...

    I tried to understand with my code
    pass by pointer

    #include<iostream> using namespace std;


    void passbypointer(int* x)
    {
    *x = 20;
    }
Results 1 to 25 of 81
Page 1 of 4 1 2 3 4