answersLogoWhite

0


Best Answer

The design of C language may be examined from the perspective of orthogonality. C language is somewhat inconsistent in its treatment of concepts and language structure, making it difficult for the user to learn (and use) the language. Examples of exceptions follow:

  • Structures (but not arrays) may be returned from a function.
  • An array can be returned if it is inside a structure.
  • A member of a structure can be any data type (except void), or the structure of the same type.
  • An array element can be any data type (except void).
  • Everything is passed by value (except arrays).
  • Void can be used as a type in a structure, but a variable of this type cannot be declared in a function.

    Disadvantages

    Too much orthogonality is also troublesome. This concept may be examined in C language:

    • All statements (including assignment, if and while) return some value, and can be used in expressions.
    • Logic and arithmetic expressions can be intermixed.

    This can cause side effects and cryptic code.

    Since languages need large number of components, too much orthogonality can cause problems. From a language designer's point of view, the most difficult task (and an important one) is to strike a balance.

    (wiki - by Buddhila Ashen Pitigala)

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give an example of lack of orthogonality in designing of c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you give an example of a sentence using the word language?

The language was an obscure dialect .


What is an example of imaginative language?

imaginiative language means something fictional or strange


Can you give 2 example of literal language?

tagalog,english


Can you give me a sentence of figurative language but that gives a example of a simile?

you and me together


What is an example of facetious language?

You expect me to give you a facetious answer to this question?I will not give you a facetious answer to this question, no sir!(Good enough?)


Give two example of server side scripting language?

PHP Perl ASP


What does HTML stand for give an example?

HTML stands for Hyper Text Markup Language. It is a scripting language that most of the webpages use.


What is particle in English language give some example?

Particle in the English language refers to the very tiny pieces like the chalk dust.


Give some example of flowery language?

Flowery language is often like poetry. There will often be a lot of words that are not necessary but make it sound pretty.


Can you give an example of figurative?

A simile is a figurative language that compares two things that are alike in some way. An example is the phrase as cute as a kitten.


Give you a example of euphemistic language?

Saying that someone has "passed on" or "passed away" is a euphemism for saying he or she has died.


What is meaning of notice?

In terms of the English language, the word notice means to give informaton or to give instructions. For example, one might give notice to an employer before quitting.