Fbise Notes-Computer | Programming in C Short Questions Chapter No.02 Class 10th

               
                 

                      Programming in C             CH# 02

      Questions and Answers



i.                      Define Computer Program.
 

Ans:          A computer program is a set of instruction(statements) written in a programming language to solve a particular problem and achieving specific results.


➤➤➤➤➤➤➤➤➤➤➤

ii.                  Differentiate between syntax and semantic
 

Ans:  Syntax:
Syntax refers to the rules of a programming language according to which statements of a program are to be written. It describes the way to write correct statements. It is similar to the grammar of a natural language.
For example: variable = expression;

Semantic:
Semantic gives meaning to statements of a programming language. It describes the sequence of operations to be performed by a computer.
For example: sum = a + b;

➤➤➤➤➤➤➤➤➤➤➤


 iii.    Write three differences between assembly language and HLLs.


Ans: Assembly Language:

            It consists of symbolic codes known as mnemonics. It was developed to make computer programming easier than machine language. A program written in assembly language must be converted into machine language before executed. An assembler is used to translate the program. Some characteristics of this language are:

a.       It allows the programmers to have access to all special features of computer.
b.      It requires less storage and less running time than HLLs. 



High Level Language:

            High level languages are English-oriented languages. They are commonly used for writing computer programs. In the language English words are used like print, go to, if, end etc. a compiler or interpreter is required to convert HLLs to machine language. Examples are Visual Basic, C, C++, Java , Pascal etc.
Some features of HLLs are:
a.       It is easy to learn and use.
b.      Coding and debugging is much easier.   
High level is classified into procedural, structured, and object-oriented programming language.

➤➤➤➤➤➤➤➤➤➤➤



iv.                Write four characteristics of HLLs.
             
       Ans:          Characteristics of HLLs:

1.      HLLs are simple, easier and less prone to errors.

2.      They are not machine dependent. The programs are independent of type of computer.

3.      The process of finding and removing errors in programs is easier.

4.      HLLs are highly structured. They allow programmers to breaks lengthy programs into modules.

➤➤➤➤➤➤➤➤➤➤➤

     

     v.   Define integrated Development Environment (IDE).     

      Ans: Integrated Development Environment:
IDE is computer software that brings all the processes and tools require for program development into one place. It makes the life of a programmer easier. They have user-friendly GUI. IDE for C language consists of:
i.                    Text Editor
ii.                  Compiler
iii.                Linker
iv.                Loader
v.                  Debugger  


➤➤➤➤➤➤➤➤➤➤➤           
                  

vi.   Differentiate between constant and variable.
             

       Ans:  Constant:
Constants are quantities whose values do not change during program execution. They may be numeric, character or string.
              Numeric Constants:
                        There are two types of numeric constants:
i.                    Integer constant
ii.                  Floating point constant.

Integer Constants:
            They represent values that are counted like number of students in a class. Examples are 7145, -234,26, etc.

Floating-point Constants:
            They are used to represent values that are measured, like the height of a person. Examples are 166.75cm, 82.6 kilograms etc.

Character Constant:
            It is one of the symbols in C character set. It includes digits 0 to 9 upper and lower case letters Aa to Zz, punctuations like . , ; and special symbols +, =, >. A character constant is enclosed by single quotes as ‘a’, ‘s’ etc.

  String Constant:
            They are the characters within double quotes such as “Hello Ahmed” etc.



Variable:
           
            A variable is a symbolic name that represents a value that can change during execution of a program. Variable are of two types numeric, character.

Numeric Variable:
            They are used to represent numeric values. They represent integer and floating-point values. Examples are sum, avg, length, salary, marks etc.

Character Variable:
            They represent character values. It can represent single character or string character. Some examples are name, city, gender etc.


➤➤➤➤➤➤➤➤➤➤➤


           

vii.              Which of the following are valid C variables? Give reason if not                          a valid  variable.         area, 5x, Sum, net pay, float_age, else, case,                        size22, my_weight.    

       Ans:          Valid Varibles:
                                    area, sum, age, size22
                        Not a valid Variable:
                                  5x(it begin with number), net pay, my weight(having space)  
                        float,else, case(reserve word).


➤➤➤➤➤➤➤➤➤➤➤

viii.            What are reserve words? Why they should not be used as variable                       names?
             

       Ans:          Reserve Words:
The words that are part of programming language and have special purpose in computer programs are called reserve words or keywords. They have predefined use and cannot be used for any other purpose. They are written in lowercase. There are 32 reserve words in C.


➤➤➤➤➤➤➤➤➤➤➤


ix.            Why comments are used in programs?
             

       Ans:          Comments in C:
It is a good programming practice  to add comments in program to make it easy for others to understand it. Comments in the source code are ignored by the compiler. There are two types of comments:
a.      Single line comment
b.      Multiple line comment

Single line comment:
            The // is used as single line comment. The syntax of single line comment is :
            // comment
Multiple line comment:
             The /*……*/ is used for multiple line comments.    


 ➤➤➤➤➤➤➤➤➤➤➤


x.                  What is the use of typecasting in C programs?
             

       Ans:          Typecasting in C:
It is a method to convert a variable from one data type to another data type during program execution. It makes a variable of one type to act like another type. For example, a variable of type int can act as a variable of type char  using type casting.


➤➤➤➤➤➤➤➤➤➤➤

Fbise Notes-Computer | Programming in C Short Questions Chapter No.02 Class 10th Fbise Notes-Computer | Programming in C Short Questions Chapter No.02 Class 10th Reviewed by fbisenotes on July 22, 2019 Rating: 5

17 comments:

  1. I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. best laser printer

    ReplyDelete
  2. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. small printer

    ReplyDelete
  3. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. someday the stars

    ReplyDelete
  4. I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates. commercial audio visual systems Dallas TX

    ReplyDelete
  5. Parents battle with their kids with their use of tablets, mobile phones, TV, and streaming services. How can a parent balance a child's use of technology with education? Programming Help

    ReplyDelete
  6. The difference between the right word and the almost right word is more than just a fine line! it's like the difference between a lightning bug and the lightning! ترفند بازی انفجار

    ReplyDelete
  7. I am so happy to read this. This is the kind of manual that needs to be given and not the accidental misinformation that is at the other blogs. Appreciate your sharing this greatest doc. devops course

    ReplyDelete
  8. pay per click programs are really great, i could earn some decent cash from it** buy shrooms

    ReplyDelete
  9. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work... best coding chair

    ReplyDelete
  10. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. Computer monitors in kenya

    ReplyDelete
  11. San Diego State University is closely tied to its community internally as a program manager and fund generating force as well as externally being a steward for broad community development and investment in the local environment תכנות לילדים

    ReplyDelete
  12. I should assert barely that its astounding! The blog is informational also always fabricate amazing entitys. https://oomnex.com/catalog/multifunction-facial-machines

    ReplyDelete
  13. I suggest just great as well as dependable info, therefore view it: תכנות לילדים

    ReplyDelete
  14. nice bLog! its interesting. thank you for sharing.... digital marketing questions

    ReplyDelete
  15. Computers are made up of a combination of hardware and software working together. Computer

    ReplyDelete
  16. Whatever a technician can do with control of your mouse and keyboard sitting in front of your computer, can also be done remotely over the internet. KombDev Philadelphia IT services

    ReplyDelete

Powered by Blogger.