Search results

  1. V

    Program to print a string

    Size of char variable is 1 byte #include <stdio.h> int main() { char charType; printf("Size of char: %ld byte\n",sizeof(charType)); return 0; } Size of char: 1 byte Each char type variable can store only one letter "Electronics" is string there are 11 letters we need one...
  2. V

    Program to print a string

    I have written two different to print string in c programming #include <stdio.h> int main() { char Book = "Electronics"; printf("Name of Book is %s \n",Book); return 0; } warning: initialization makes integer from pointer without a cast [-Wint-conversion] char Book...
  3. V

    Timer interrupt programming

    Hello I have written program to set timer interrupt on 8051 microconroller. I want to set interuupt for 50 ms Fosc = 11.0592Mhz tick = 12/11.0592M = 1.085069444us = 1.085us Interrupt time = 60 ms 60,000*1.085= 55299 65536-55299= 10237 =ox27FD #include<reg51.h> sbit LED = P1^0; int...
  4. V

    Positive and negative number

    PositiveNegative[10] = {5,2,-1,4,0,-6,0,-7,9,1}; The program does not count 0 as a positive or negative number. Positive number 5 Positive number 2 Negative number -1 Positive number 4 Entered 0 number Negative number -6 Entered 0 number Negative number -7 Positive number 9 Positive number...
  5. V

    Positive and negative number

    look at this #include <stdio.h> int main(void) { int i; int positive= 0, negaive=0; int PositiveNegative[10] = {5,2,-1,4,8,-6,8,-7,9,1}; for (i = 0; i <10; i++) { if ((PositiveNegative[i]==0)) { printf(" Entered 0 number...
  6. V

    Positive and negative number

    Hello I wrote program in c that can be find positive and negative number. after that I am trying to find out how many positive and negative number's are there in array #include <stdio.h> int main(void) { int i; int PositiveNegative[10] = {5,2,-1,4,8,-6,8,-7,9,1}; for (i = 0; i...
  7. V

    LPC2148 ARM7TMDI based microcontroller

    Hello I just tried to write first program and I have written following program. I have compiled program with no errors #include <LPC213X.H> void delay(unsigned int wait); void delay(unsigned int wait) { unsigned i; for( i = 0; i < wait; i++) { } } int main (void) {...
  8. V

    Function and their types

    int z = 10; int * a = 15; I think a is pointer variable and it store the address of variable 15 so pointer variable store only the address of another variable. a will hold the address of z during the execution right int *a = 15 we don't write this because compiler assign address to pointer...
  9. V

    Function and their types

    int z; // we are declaring variable name z is name of variable // int z=10; // we are declaring variable and assigning value 10 to variable z &z means the address of variable z int *a // we are declaring pointer variable and name of pointer variable is a and * is operator // int *a = 15...
  10. V

    Function and their types

    This one because it doesn't change the value of actual argument. #include<stdio.h> void function(int a); int main(void) { int a=10; printf(" Before calling a = %d \n",a); function(a); printf("After calling a=%d \n",a); return 0; } void function(int a) { a=15; } I am passing address...
  11. V

    LPC2148 ARM7TMDI based microcontroller

    ■ EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging with the on-chip RealMonitor software and high-speed tracing of instruction execution. ■ USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM. In addition, the LPC2146/48 provides 8 kB of on-chip RAM...
  12. V

    Function and their types

    call by value #include<stdio.h> void function(int a); int main(void) { int a=10; printf(" Before calling a = %d \n",a); function(a); printf("After calling a=%d \n",a); return 0; } void function(int a) { a=15; } Before calling a = 10 After calling a=10 I have noticed value of...
  13. V

    LPC2148 ARM7TMDI based microcontroller

    Does LPC148 has inbuilt programmer circuit on chip or LPC148 has additional programmer chip on development board. I have never worked with Arduinos but I think everything is there on same board. we just connect Arduinos board to PC and then open Arduinos IDE, we write program and upload the...
  14. V

    LPC2148 ARM7TMDI based microcontroller

    I want to start work with LPC148 Microcontroller. I have downloaded datasheet and started reading. LPC2148 is 32 bit microcontroller from ARM-7 family. It has 32 to 512KB of internal flash program memory and 32 to 8K of internal Data memory. We can use Keil compiler to develop program. I am...
  15. V

    Function and their types

    What should I do next, Do I read another topic in programming or try to become good in this topic only. I think now I understood function and their types . Actually I want start work with LPC arm controller. I have downloaded datasheet but I have some doubt's. should I start with new thread
  16. V

    Function and their types

    Hello I did it. but it give same message " The system cannot execute the specified program."
  17. V

    Function and their types

    I think I found out the problem it's about the initialization of variable. bob was assigning count = 0; and I am assigning count = 1; #include<stdio.h> int count = 1; int counter(void) { count++; return count; } int main() { while (1) { printf("%d\n", counter())...
  18. V

    Function and their types

    Please take look at below quote message I didn't move on another topic. I took simple example for better understanding because I was trying from long time. so I thought I should take simple example. It's fine I will be stay with example given by bob I gone through that link's and still...
  19. V

    Function and their types

    Hello bob what do you think about my last post. does it make any sense for you?
  20. V

    Function and their types

    look at following program's. I have not compiled all program I am just showing you my understanding Function with no return value and no argument This program doesn't return any value and doesn't pass any argument. #include<stdio.h> void number(void) { unsigned int value = 2; printf("...
Top