Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6893465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:39:44+00:00 2026-05-27T06:39:44+00:00

This is the question: Using the Right-Left rule write the C definition of a

  • 0

This is the question:
Using the Right-Left rule write the C definition of a variable named fubar that is a pointer to a function that
takes a pointer to a char and returns a pointer to an array of 7 elements where each element is a pointer to a
struct Sporcle.

My answer:

*( (Sporcle*)[7] ) ( *fubar )( char* );

Can anyone verify my answer and/or give me some pointers (no pun intended)?

Edited Answer:

( (struct Sporcle*)[7] ) *( *fubar )( char* );

Final Answer

struct Sporcle *(*(*fubar)(char *))[7];

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:39:45+00:00Added an answer on May 27, 2026 at 6:39 am

    Build it up a piece at a time:

    A variable named fubar…

    fubar
    

    …that is a pointer…

    *fubar
    

    …to a function…

    (*fubar)()
    

    …that takes a pointer to a char…

    (*fubar)(char *)
    

    …and returns a pointer…

    *(*fubar)(char *)
    

    …to an array of 7 elements…

    (*(*fubar)(char *))[7]
    

    …where each element is a pointer…

    *(*(*fubar)(char *))[7]
    

    …to a struct Sporcle.

    struct Sporcle *(*(*fubar)(char *))[7]
    

    Your answer is incorrect – the thing on the left (called the declaration specifier) can only directly specify a type (a base type like int, a struct, union, enum or type name defined with typedef, optionally modified with a storage class specifier like static and/or a type specifier like const). Pointer, array and function types are constructed by modifying the right-hand-side of the declaration (called the declarator), by adding *, [] or () to it.

    In this case, the declaration specifier is struct Sporcle and the remainder is the declarator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using markdown to edit this question right now. In some wikis I used
This question discusses encrypting data on the iPhone using the crypt() function. As an
This question came about because the cells gem specifies template directories using File.join('app','cells'). That
In relation to this question on Using OpenGL extensions , what's the purpose of
Yesterday I posted this question regarding using lambdas inside of a Join() method to
This question is about using getter methods of a singleton object in worker threads.
Using this question as the base is there an alogrithm or coding example to
Note: In this question I'm using the term autocomplete (or iterative search) to refer
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
In this question , I asked about using queue's and threads in C#. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.