Search results

  1. V

    Function and their types

    Yes I have compiled every program and then I posted result. generally I see this error when something is wrong in program
  2. V

    Function and their types

    I just type in cmd gcc -o hello hello.c hello it show only message "The system cannot execute the specified program" it deosn't show any error or warnings
  3. V

    Function and their types

    Sorry but it's not working on winGw. what's wrong #include<stdio.h> int count = 0; int counter(void) { count++; return count; } int main(void) { counter(); while (1) { printf(" count %d \n", counter()); } return 0; } The system cannot execute the...
  4. V

    Function and their types

    I compiled your program #include<stdio.h> int count = 0; int counter(void) { count++; return count; } int main(void) { while (1) { printf(" count %d \n", count); } } result :The system cannot execute the specified program. I think we only print the value of...
  5. V

    Function and their types

    Thanks. Does this program make any sense or it could be better #include<stdio.h> unsigned int count_value(void); int main(void) { count_value(); return 0; } unsigned int count_value (void) { unsigned int value = 1; if ( value == 2) { printf (" return value %d ",value)...
  6. V

    Function and their types

    so does below program return only number 4 int delay (void) { unsigned int i; for (i = 0; i < 4; i++) { printf(" Print number : %d \n ",i); } return i; } Look at another example. i tried to make program function with return value but no argument...
  7. V

    Function and their types

    I am confuse, can we say that below function return only integer value ( 0,1,2,3,4) int delay (void) { unsigned int i; for (i = 0; i < 5; i++) { printf(" Print number : %d \n ",i); } return i; } so when this function execute it return only integer...
  8. V

    Function and their types

    Function with return value but no argument #include<stdio.h> int delay (void) { unsigned int i; for (i = 0; i < 5; i++) { printf(" Print number : %d \n ",i); } return i; } int main (void) { int x; x = delay(); printf(" Print delay ...
  9. V

    Function and their types

    Function with no argument and no Return value #include<stdio.h> void delay (void) { unsigned int i; for (i = 0; i < 3 ; i++) { printf(" Print number : %d \n ",i); } } int main (void) { delay(); return 0; } Print number : 0 Print number : 1...
  10. V

    Function and their types

    right I have done mistake i posted wrong program #include<stdio.h> void delay (void); int main (void) { delay(); return 0; } void delay (void) { unsigned int i; for (i = 0; i < 6; i++); { } } I was trying to assign value of delay function to another...
  11. V

    Function and their types

    I studied about Function with no argument and no Return value and then tried to make my own program I want to do like this example https://www.tutorialgateway.org/types-of-functions-in-c/
  12. V

    Function and their types

    I have read it about function and their types in c programming. so after reading I tried to write program for function with no argument and no return type This is my program ( void function_name (void) #include<stdio.h> void delay (void); int main (void) { int number; number = delay()...
  13. V

    Ideas to start my project.

    If you want to make any project then first you should know what's the purpose of your project. then try to find out what's the requirement of your project such as what's the part's are require to develop your project then download there datasheet. you will find all information in datasheet. Now...
  14. V

    Pointer dereferencing

    Thanks Merlin3189. I was reading a book in which an example of Pointer was given with explanation but I didn't understand there. This is just simple example of pointer. I will try to solve more difficult examples
  15. V

    Pointer dereferencing

    Thanks AdamSant. its clear #include<stdio.h> int main(void) { int * pointer; /*declaration of integer pointer*/ int a=100, b; /*declaration of integer variable*/ pointer = &a; /*assigning address of variable a*/ b = *pointer; printf("The value of variable a is...
  16. V

    Pointer dereferencing

    In the book there is following paragraph which I don't understand what's the exact meaning There is not further explanation So I wrote program #include<stdio.h> int main(void) { int * pointer; /*declaration of integer pointer*/ int a=1, b; /*declaration of integer variable*/...
  17. V

    How to write program

    I am only familiar with 8051 and arm cortex m0 micro-controller. If possible can you help me to make common program for keypad interfacing like handy program
  18. V

    How to write program

    Many many thanks for helping me I understand the loops, while loops, if else statements but the problem is that when I am trying to write program I am facing problems. If 8 pins of matrix keypad connected to port P2 of 8051 Now I know how does matrix keypad connected to 8051.I don't know how...
  19. V

    How to write program

    I am trying to write keypad program, I work with 8051 and keil compiler so I did google search and I found so many links . I have read following three links but still I am confuse because the program has been written differently in all the three links and I don't understand how to write...
  20. V

    What are real example of " While Loop"

    I do not know whether this question should be asked or not but I am confuse. This is reason reason I am asking here. I wanted to know how do we use while Loop in c language I wrote program and read about while loop in my book. I thought I should write my own programs so, I made some examples...
Top