Search:

Type: Posts; User: somali.cc

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    2,173

    For inputing 5 names ( i.e. 5 strings) you can...

    For inputing 5 names ( i.e. 5 strings) you can use a 2-D character array , like


    char nam[5][10]; // 5 names , each of maximum 10 chracters
    int i;
    for(i=0;i<5;i++)
    {
    printf("Enter nam[%d]...
  2. Replies
    8
    Views
    2,173

    I am a newbie to C-programming , so just making...

    I am a newbie to C-programming , so just making an effort to get into the logic of ur code.

    char nam[5]; means we r declaring an array of 5 elements where each element is a single character OR a...
  3. Replies
    2
    Views
    1,280

    Oppss....That was a pathetic mistake i...

    Oppss....That was a pathetic mistake i made..!!!:tongue:



    Thankss Salem...It worked out beautifully for me...Thank u so so much...:redface:
  4. Replies
    2
    Views
    1,280

    Series output problem

    I need to print the following series :

    1-1/2+1/3-1/4......+-1/n

    where n will be given by user.

    I have written the code as :


    int main()
  5. Replies
    2
    Views
    897

    Confusion with 2-D array :

    int main(void)
    {
    int a[3][3]={{1,2,3},{5,6,7},{9,0,1}};
    printf("\n\n Address of a[1]=%u",&a[1]);
    printf("\n\n Value of a[1]=%u",a[1]);
    printf("\n\n Element at a[1][0]=%d",*a[1]);
    ...
  6. Replies
    4
    Views
    1,023

    Conceptual Problem with Array-Size

    I am using Turbo C++ IDE . When I am using the following code :



    int main(void)
    {
    int size=5,arr[size];

    .......;
    .......;
  7. Replies
    22
    Views
    2,623

    And I would have to say pls dont try to...

    And I would have to say pls dont try to discourage ppl who want to share and learn C-programming with such out-of-context comments...I have just provided the code that I had felt might work for the...
  8. Replies
    22
    Views
    2,623

    Will this work for you ?

    /* Input 10 numbers in an array and count the number of occurence of an element inside the array */


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

    void main()

    {
  9. Replies
    7
    Views
    1,672

    @Salem : True, main() always returns integer...

    @Salem : True, main() always returns integer value.

    What if I want a function not to return anything ?

    Shud it not be preceede by the keyword void or add another statement : return(0);
    ...
  10. Replies
    7
    Views
    1,672

    Thank U Adak..Thanx soo much for the explanation...

    Thank U Adak..Thanx soo much for the explanation and solution...U rock man..!! :o :redface:
  11. Replies
    7
    Views
    1,672

    Hi Adak, thnx for replying me. Using...

    Hi Adak, thnx for replying me.

    Using a=tolower(a); cud have been used, but then i cudnt have printed :- The lower-case for A is : a

    And yes, i wl definitely go by ur suggestion of using 'a'...
  12. Replies
    7
    Views
    1,672

    Code giving undesired output..

    /*Toggle-Case : If lower-case character entered, then change to upper-case and vice-verse :*/


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

    void main()

    {
Results 1 to 12 of 12