Search:

Type: Posts; User: sameertelkar

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,071

    ^^^What is the meaning of typing main...

    ^^^What is the meaning of typing main explicitly?Does it mean int main()?Also I omitted the ampersand and getch sign as you said,here is the updated code,I have shortened it to 3 students.......

    ...
  2. Replies
    6
    Views
    1,071

    oops,I was careless to add that meaningless %...

    oops,I was careless to add that meaningless % over there
    @Amitesh,I changed the scanf of name to %s but still ain't getting output
    @grumpy,can you please correct the code?I am a beginner to C and...
  3. Replies
    6
    Views
    1,071

    Unable to get output..........

    Code to accept the information of 5 students and display the information of first 3 students......


    #include<stdio.h>
    main()
    {
    struct stud
    {
    char name[20];
    int rollno;
  4. Replies
    7
    Views
    875

    'a' is a pointer,so when I increment it,it points...

    'a' is a pointer,so when I increment it,it points to the next element.Why is it meaningless?
  5. Replies
    7
    Views
    875

    Need help getting output.........

    Its a code to find the largest number of a 3X3 matrix.The logic seems to be right........


    #include<stdio.h>
    main()
    {
    int matrix[3][3],i,k,j,*a;
    a=&matrix[0][0];
    printf("Enter the...
  6. Replies
    15
    Views
    1,887

    Here 12819

    Here
    12819
  7. Replies
    15
    Views
    1,887

    Dear Jim,My original code did get compiled...

    Dear Jim,My original code did get compiled without errors but I am getting a wrong output,I tried your code and I got the same output,I think there is some problem with the compiler.
    Edit-I also...
  8. Replies
    15
    Views
    1,887

    Oh,here are the...

    Oh,here are the values,2000,15000,40000,60000,10000.
    @Elkvis,some of the commands you used are not in my syllabus yet.
  9. Replies
    15
    Views
    1,887

    Unable to get output..........

    Unable to get output of this program,add bonus to employee salaries


    #include<stdio.h>
    main()
    {
    int salary[5],i;
    printf("Enter the salaries");
    for(i=0;i<=4;i++)
    {
  10. Replies
    7
    Views
    984

    Thanks,got the output,just had to use a...

    Thanks,got the output,just had to use a pre-processor directive.
  11. Replies
    7
    Views
    984

    Hello codeplug,can you explain what is stdout?Is...

    Hello codeplug,can you explain what is stdout?Is it a pre processor directive like stdio?
  12. Replies
    7
    Views
    984

    There are no error messages,I just cannot see the...

    There are no error messages,I just cannot see the output screen.
  13. Replies
    7
    Views
    984

    Unable to get output..........

    main()
    {
    int i=3;
    printf("value of i=%d",i);
    printf("address of i=%u",&i);
    printf("value of i=%d",*(&i));
    }
  14. Replies
    3
    Views
    737

    I forgot to add printf statement,thanks sonjared....

    I forgot to add printf statement,thanks sonjared.


    main()
    {
    char ch;
    printf("enter an alphabet");
    scanf("%c",&ch);
    printf("%d",ch);
    if(ch>=65 && ch<=90)
  15. Replies
    3
    Views
    737

    Need help getting output.........

    main()
    {
    char ch;
    printf("enter an alphabet");
    scanf("%c",&ch);
    if(ch>=65 && ch<=90)
    return(ch);
    else
    return(ch+10);
    }
  16. Thank you Matticus,yes [j-1] does go outside the...

    Thank you Matticus,yes [j-1] does go outside the bounds and your suggestion is better.
    Here is the better code.


    #include<stdio.h>
    main()
    {
    int lnum[5][5];
    int i,j,lnsf=1;
    ...
  17. Thank you Salem,after an hour of trying your...

    Thank you Salem,after an hour of trying your suggestion,I finally got it.Here is the code.


    #include<stdio.h>
    main()
    {
    int lnum[5][5];
    int i,j,lnsf;
    for(i=0;i<=4;i++)
    {
  18. Salem,I am still unable to frame the logic,do I...

    Salem,I am still unable to frame the logic,do I have to use strings or structures?
  19. A program to find largest number from 5 row by 5 column matrix

    I made the code that stores and prints 5 row by 5 column values but I have no idea how find the largest number from them.What should I do to find the largest number?If I use if-else then it would be...
  20. Replies
    9
    Views
    1,072

    I think we have to mention '%d' for value or '%u'...

    I think we have to mention '%d' for value or '%u' for address and depending on that it'll print.
    Thank you.
  21. Replies
    9
    Views
    1,072

    I tried it and I got the value but in my Text...

    I tried it and I got the value but in my Text book its written that it gives the address?May be a typo?
  22. Replies
    9
    Views
    1,072

    A confusion regarding arrays

    Does S[0] give the address of the 0th element of the array S or does it give the value?
  23. Replies
    11
    Views
    2,175

    I have already compiled it and ran it and I am...

    I have already compiled it and ran it and I am getting the desired output.And the typo was when I copied it into this forum,it wasn't in the actual code.
    My question remains unanswered.
  24. Replies
    11
    Views
    2,175

    oops,It was typo,actually its, ...

    oops,It was typo,actually its,
    i=((year/100)%10);
    So in that case i will be 988 but still it seems to print 'dcccc',how when i isn't 9?
  25. Replies
    11
    Views
    2,175

    Need help understanding this code

    Its a code to convert any given year into its Roman equivalent.


    #include<stdio.h>


    int roman(int year)
    {
    int i;
    printf("The year %d is converted to Roman------->",year);
Results 1 to 25 of 47
Page 1 of 2 1 2