PPSC Computer Science Topic 8 MCQ's Test Preparation

Candidates who are preparing themselves for the PPSC computer science test can find the best preparation through the given PPSC mock tests by Ilmkidunya. These tests have been designed in the same manner as the authority uses to arrange the PPSC paper. PPSC is known as a Punjab Public Service Commission, PPSC and it is working to hire suitable candidates for various vacant positions in different government organizations. PPSC arranges a separate paper for every single discipline or vacant position. We offer the best wishes to all the candidates who are going to appear for the PPSC computer science paper.

MCQ's Test For PPSC Computer Science Topic 8 C Programming

Try The MCQ's Test For PPSC Computer Science Topic 8 C Programming

  • Total Questions20

  • Time Allowed20

PPSC Computer Science Topic 8 C Programming

00:00
Question # 1

To read the formatted input data from a file, which of the following function is used.

Question # 2

What are the values of a, b are if the following code fragemnt is executed int a , b = 7
a=b<4? b << 1, b> 4?7 >> 1 a;

Question # 3

With the following declaration , the correct answer is.enum rgb (red = -1, green , blue)

Question # 4

The given statement FILE "fptr;

Question # 5

Which of the following is a not a keyword of C langauge.

Question # 6

If suppose a variable 'a' is initialized as int a = oxff, then what will be output for the below code.
(a << 4>>12)? printf ("Humaira') printf (" iram")

Question # 7

Which of the following correctly access the seventh element stored in foo, an array with 100 elements.

Question # 8

The given statement of FILE * fptr,

Question # 9

The function fprint is used in the program.

Question # 10

# define preprocessors command can be used for defining.

Question # 11

The function used to position the file pointer in C is

Question # 12

Which of the following is a LOOP statement of a C language.

Question # 13

The number of arguments for realloc ( ) function is.

Question # 14

The function 'foo' returns the following type as result.

Question # 15

String concatenating means.

Question # 16

How would you declared constant of 5 called 'MYCONST"?

Question # 17

Which of the following is an advantage of using macros over functions.

Question # 18

How is a variable accessed from another file.

Question # 19

Which of the following is not a correct variable type.

Question # 20

Given b=110 and c =20, what is the value of 'a' after execution of the expression a = b -= c + =5?

Prepare Complete Set Wise PPSC Computer Science Topic 8 C Programming MCQs Online With Answers


Topic Test

00:00

Top Scorers Of PPSC Computer Science Topic 8 C Programming MCQ`s Test

  • T
    Tayyaba Shafique 21 - Nov - 2024 01 Min 09 Sec 20/20
  • A
    Afeera Saeed 18 - Jun - 2022 01 Min 17 Sec 20/20
  • C
    Creative Computer Academy 10 - Oct - 2024 04 Min 56 Sec 20/20
  • R
    Rimsha Habib 16 - Dec - 2021 02 Min 05 Sec 17/20
  • A
    Aisha Tariq khan 29 - Dec - 2021 02 Min 59 Sec 15/20
  • K
    K.b Wri8s 25 - Jul - 2024 00 Min 35 Sec 14/20
  • G
    ggdc kk 25 - May - 2024 05 Min 59 Sec 14/20
  • A
    Ayesha Siddique 30 - Dec - 2021 05 Min 34 Sec 12/20
  • M
    Muhammad Usman 18 - Jun - 2022 08 Min 42 Sec 12/20
  • A
    Arshad Mehmood 13 - Jun - 2024 09 Min 04 Sec 12/20
  • S
    Sana Rasheed 31 - Jan - 2022 04 Min 38 Sec 11/20
  • M
    M Usman 20 - Sep - 2023 06 Min 44 Sec 11/20
  • K
    Kasur City 18 - Apr - 2024 06 Min 33 Sec 10/20
  • R
    Ramla Siddiqui 26 - Dec - 2023 09 Min 21 Sec 10/20
  • M
    Muhammad Riaz 27 - Aug - 2024 09 Min 23 Sec 10/20

PPSC ComputerScience Chapter 8 Important MCQ's

Sr.# Question Answer
1 The benefit of using enumeration data types in a program is
A. Program becomes shorter
B. Program becomes longer
C. Program is easy to understand
D. Program become complex
2 While working with the binary Strems for 'C' I/O file operations.
A. Only the binary values can be read and can be written
B. No character transition take place
C. Character translation takes place
D. Both a and b above
3 Multiple macro can be defined by placing _____ at teh end of each line except the last.
A. /
B. \
C. #
D. $
4 Which of the following functions are used in unformatted data files.
A. Fscanf
B. Fwrite
C. Fread
D. fscanf & fwrite
5 It is necessary to declare the type of the function in the calling program if.
A. The function return an integer
B. The function retern an integer
C. Function returning only the float values
D. The function return a non integer value.
6 What's wrong in the following statement provide K is a variable of type Int.
(k=2 , k <= 12, k++)
A. The increment should always be ++k
B. The variable must always be the letter i when using a for loop
C. The variable k can't be initialized
D. The commas should be semicolons.
7 What is the base data type of a pointer variable by which the memory would be allocated to it.
A. Int
B. Float
C. No data type
D. Unsigned int
8 With the following declaration , the correct answer is.enum rgb (red = -1, green , blue)
A. red = -1, green = -2, blue = -3
B. red = -1 , green = 0 blue = 1
C. red = -1 , green = 2 blue = 3
D. All above alternative are illegal declarations.
9 The arguments in main () function are known as.
A. Program parameter
B. Command line arguments
C. Both a and b above
D. None of these
10 The given statement FILE "fptr;
A. Defines a pointer to the pre defined structure type FILE.
B. Defines a pointer to the usere defined structure type FILE
C. Defines a pointer to the pre-defined data type FILE DESCRIPTOR.
D. Creates a file pointed by fptr

Test Questions

Share your comments & questions here

Guest
  • No comments yet. Be the first to comment!