Search:

Type: Posts; User: narendrav

Page 1 of 2 1 2

Search: Search took 0.01 seconds; generated 39 minute(s) ago.

  1. Replies
    1
    Views
    5,305

    Multiple declaration of function

    Why does this code output 2.Isn't it illegal to declare the same function again.

    #include <stdio.h>
    void foo();
    int main()
    {
    void foo(int);
    foo(1);
    return...
  2. Replies
    3
    Views
    3,285

    Oh.i did not take them into account. And there...

    Oh.i did not take them into account.
    And there is no guarantee that i find 'm' in that location.
    Like i said as data changes value at that location changes.
    how to go that exact location?
  3. Replies
    3
    Views
    3,285

    moving file pointer to specific location

    I have a file "data.txt" with following content


    mark zuckerbergsiliconvalcalifornia
    jimmy wales london unitedking

    As you can see every record is on new line and size of each...
  4. Replies
    2
    Views
    6,158

    binary search tree with templates

    Hi.I am trying to implement BST using templates.
    This is the code that i have written.



    template <class T>
    struct node
    {
    struct node *left;
    T info;
  5. Replies
    41
    Views
    7,617

    initialization in multi dimensional arrays

    I created and initialized a multi dimensional array as follows:



    int arr[3][2] = {{1,2},{3,4},{5,6}};


    when i wrote down the following line, it printed the value 4.
  6. Replies
    6
    Views
    1,891

    ok..thanks for the explanation.. i read the FAQ...

    ok..thanks for the explanation..
    i read the FAQ which said absolutely the same thing..
    "The behaviour cannot be determined..."
    But it is the first time i came across this kind of question.
    so i...
  7. Replies
    6
    Views
    1,891

    went through the FAQ but still cannot determine...

    went through the FAQ but still cannot determine the logic in my program..
    can you please post a little explanation..
  8. Replies
    6
    Views
    1,891

    pre-increment operator..

    i wrote the following program and it's output is 14.



    #include <stdio.h>


    main()
    {
    int i=5;
  9. Replies
    11
    Views
    59,469

    @@laserlight,@@Matticus ,@@Salem,@@phantomotap...

    @@laserlight,@@Matticus ,@@Salem,@@phantomotap
    Thanks for your help.
    I have now sorted it out.
    But today i learnt something about "scanf" which i did not know earlier.
    Once again thanks for...
  10. Replies
    11
    Views
    59,469

    @@laserlight .. i am sorry.. i was stupid not to...

    @@laserlight ..
    i am sorry.. i was stupid not to notice it..
    thanks for pointing it out.
    But i still dont understand this


    if(scanf("%d",&num) == 1)

    Is it the number of successfully read...
  11. Replies
    11
    Views
    59,469

    this is the program that i wrote ... for adding...

    this is the program that i wrote ... for adding the digits in a number..
    I USED THE CODE GIVEN BY SALEM TO WRITE THE PROGRAM.
    Somehow it's not working..



    #include <stdio.h>
    #include...
  12. Replies
    11
    Views
    59,469

    @@phantomotap.. A small program PLEASE..!! it...

    @@phantomotap..

    A small program PLEASE..!!
    it would help me a lot..!!

    Thank you.
  13. Replies
    11
    Views
    59,469

    I did not get you.on the above statement. can...

    I did not get you.on the above statement.

    can you please show me a small program on how to check user input.
    i want the user to tell
    1.if he enters a character..i want to tell him to enter only...
  14. Replies
    11
    Views
    59,469

    isdigit() to validate if input is number..

    Hi..
    i have a doubt..
    i have seen that isdigit() function is used with "character" data type..
    but can we use to validate an "integer"...??
    i mean is it ok..to write like this..



    int num;...
  15. Replies
    9
    Views
    1,701

    ok...ok...references are really a little...

    ok...ok...references are really a little confusing for me...
  16. Replies
    9
    Views
    1,701

    yeah..i know when we use pass by reference then...

    yeah..i know when we use pass by reference then in while calling we use...


    swap(&m,&n)


    and while recieving it we use..


    void swap(int *p,int *q)
  17. Replies
    9
    Views
    1,701

    while calling the function we just said.. ...

    while calling the function we just said..


    swap(m,n)

    .
    .
    which means we are actually passing the values of m and n
    ....
  18. Replies
    9
    Views
    1,701

    Template Program..

    This is a program to swap two numbers...implemented using template...




    #include <iostream>
    using namespace std;
    template <class T>
    void swap(T &x, T &y)
    {
  19. Replies
    5
    Views
    1,439

    thanks..for the reply.. but i dont know what...

    thanks..for the reply..
    but i dont know what does this isprint function does..
    can you please explain..
  20. Replies
    5
    Views
    1,439

    password program

    hi..i am trying to write a small password program..this is the code i have written...



    #include<stdio.h>
    #include<conio.h>

    int main()
    {
    clrscr();
  21. Replies
    5
    Views
    1,107

    ok..thank you...very much..for the quick...

    ok..thank you...very much..for the quick reply..!!!
  22. Replies
    5
    Views
    1,107

    hmm..i still dont understand.. are we trying to...

    hmm..i still dont understand..
    are we trying to initialize the values of the memebers of the base class also..along with the members of the derived class..??
  23. Replies
    5
    Views
    1,107

    constructors in derived class...

    i was going through a program on run-time polymorphism and i encountered a program which had 1 base class and 2 classes derived from the base class..
    the base class is as follows



    class media...
  24. Thread: if

    by narendrav
    Replies
    6
    Views
    830

    you have to use a condition..like.. if(3%2...

    you have to use a condition..like..


    if(3%2 == 1)
    {
    printf("A");
    }
    else
    {
    printf("B");
  25. Replies
    1
    Views
    1,087

    how to read data of any type into array

    i want to read data of any type into an array....Is it possible..??
    if possible how to do it..??
Results 1 to 25 of 45
Page 1 of 2 1 2