Search:

Type: Posts; User: coolshyam

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    1,334

    Malloc

    the array you provided takes up extra space in your RAM
    so, the concept of malloc is used. malloc dosent increase space but takes the extra space to the hard disk. it will execute the program in...
  2. Replies
    6
    Views
    1,199

    Strange

    int a[10] = { [4] = 1, [7] = 1 };
    well well well well. the [4]=1 here refers to a[4]=1
    and [7]=1 refers to a[7]=1.so they are one. but i couldnt understand how the remaining elements, a[0],...
  3. Thread: Help parsing

    by coolshyam
    Replies
    7
    Views
    1,640

    small mistake

    the array is returned only after you identify the space bar next to a name . so, modify the progam in the following line


    char actors[] = "Kate Winslet, Johnny Depp, Morgan Freeman, Tom Hanks, ";
  4. Replies
    10
    Views
    50,939

    WELL Mr.16

    so what if it is 16 years old
    we are discussing logic behind programs dear.it dosent matter if it is 16 years old or 1 day old. c programming needs C that's it. but i do agree that there will be...
  5. Replies
    3
    Views
    2,159

    Several

    u can use puts
    u can use putc
    u can use putchar
    u can use assembly code asm
    u can define your own printf
    e.g. #define yourname printf
    u can write to the VDU yourself
  6. Thread: please help

    by coolshyam
    Replies
    9
    Views
    1,363

    the solution

    you opened the file in the if statement. this should not be done becaus the null point assignment takes place only in the next line of comparision. you will be clear after you see my code below....
  7. Replies
    14
    Views
    3,911

    A Simple Solution

    dude.its all done.hope it works on Dev C++


    #include <stdio.h>
    #include<dos.h>
    int main(void) /*wait for keypress*/
    {

    float weight, value;
    char beep;
  8. Replies
    13
    Views
    2,272

    An Alternate Method

    create a file named user.txt in temp directory
    i have given you an example in which only the username is taken into account
    remaing work is your effort


    int main()
    {
    FILE *fp;
    char...
  9. Replies
    8
    Views
    1,105

    Well I Do Have The Explanation

    a*b%c+3

    in this apply the BOMDAS rule
    that is bracket
    of
    multiply
    divide
    add
    substract
  10. Replies
    3
    Views
    2,136

    i want my output to be generated

    hello everybody. the program below uses the kbhit to get a character from the key board.
    when i tried to execute the program in Visual C++, the output showed press any key to continue.after pressing...
  11. Replies
    8
    Views
    5,221

    my logic

    i have seen the usage of isspace function.thats nice.
    but you can use the ascii value of space instead.the ascii value of space is 10 i suppose.so


    while(input[i]!=\0)
    {
    ...
  12. Replies
    4
    Views
    2,464

    two methods

    hi there
    you can use two methods for this
    1. as our dear friend notified, use


    strcpy(tname,name);

    else
  13. sorry didnt notice what the user wanted. actually...

    sorry didnt notice what the user wanted. actually i forgot.so, i used w+ mode.


    fp=fopen(argv[1],"r");
  14. Arguements

    when you take the name of the file from the user,it is better to use arguements.
    for example,


    int main(int argc, char *argv[])
    {
    FILE *fp;
    fp=fopen(argv[1],"w+");
    ...
  15. Replies
    5
    Views
    7,746

    yes i do realize that most of you buddies use dev...

    yes i do realize that most of you buddies use dev C++. but i dont own a computer. i use my college computer and the admin dosent allow me to download devc++. no probs.i shall not use getch() any...
  16. Replies
    3
    Views
    981

    A New Twister In Town!

    frankly speaking, i have learnt a lot in C through this site because of all of you.i have a small clarification



    look at my code below


    #include<stdio.h>
    #include<conio.h>...
  17. Thread: strcmp

    by coolshyam
    Replies
    4
    Views
    3,658

    strcmp

    all the possible libraries use the following method to compare two strings


    for(i=1;i<strlen(smaller of the strings);i++)
    {
    int count=0
    if(string[i]!=string2[i])...
  18. Replies
    5
    Views
    3,242

    Solved

    Well the logic given by our friend is right
    use factorial(i)
    i took the pain of compiling it in TurboC
    here is the debugged program




    #include <stdio.h>
    #include<conio.h>
  19. Replies
    5
    Views
    7,746

    its fine in a TurboC compiler if you add getch()...

    its fine in a TurboC compiler if you add getch()


    #include <stdio.h>

    int main()
    {
    double a = 0;

    printf("enter a number: ");
  20. Replies
    16
    Views
    51,556

    perhaps...but

    yes.but how can the compiler identify whether the spaces have been created due to a tab or by typing multiple spaces
    but, while copiling using multiple spaces, the turboC compiler gave me an error...
  21. Replies
    4
    Views
    3,368

    as you say sir

    as you say sir
  22. Thread: Help Please!

    by coolshyam
    Replies
    6
    Views
    1,267

    The Program Done

    i dont know how you could display 20 values at the same time on the screen
    do look at the output generated by my program
    it's done using TurboC


    #include <stdio.h>
    #include<conio.h>
    #define...
  23. Replies
    4
    Views
    3,368

    [B]but if you look at VB we can easily mask the...

    [B]but if you look at VB
    we can easily mask the characters in a text box
    perhaps there is a seperate library file in VB which
    just allows us to do that????
    by the way, what languge is used to...
  24. Replies
    19
    Views
    3,271

    The Program Is Solved

    well obviously the code took -300 also as the temperature
    because, it comes under the case


    if(temp<cool)

    so, it is better if you use a seperate statement like


    if(temp==-300)
  25. Replies
    4
    Views
    3,368

    Masking Characters In Scanf

    i am at present working on an ATM paper in the IEEE transcation
    the problem is i need t mask the characters that appear on the screen with a "*" when the user is entering the pin

    i know that...
Results 1 to 25 of 26
Page 1 of 2 1 2