SlideShare a Scribd company logo
1 of 8
1. You can use C++ as a procedural, as well as an object-oriented, language

    A.      True    B.      False

2. A default catch block catches

    A.      all thrown objects               B. no thrown objects

    C.      any thrown object that has not been caught by an earlier catch block

D. all thrown objects that have been caught by an earlier catch block



3. Adding a derived class to a base class requires fundamental changes to the base class

    A.      True    B.      False

4. The use of the break statement in a switch statement is

    A.optional              B.compulsory

    C.not allowed. It gives an error message D.to check an error

    E. None of the above



5. To expose a data member to the program, you must declare the data member in the
_____ section of the class

    A.      common          B.      exposed

    C.      public D.       unrestricted

    E.      user



6. Evaluate the following expression: 3 >6&&7>4

    A.      True    B.      False

7. Which of the following are valid characters for a numeric literal constant?

    A.a comma                       B. a dollar sign ($)

    C.a percent sign (%)            D.a space

    E.None of the above

8. A function that changes the state of the cout object is called a(n) _____
A. member              B.     adjuster

C. manipulator         D.     operator



9   .A constructor that accepts __________ parameters is called the default constructor.

    A.      one        B.     two

    C.      no         D.     three



10. Can a class have virtual destructor?

    A.      Yes        B.     No



11. A function that is called automatically each time an object is destroyed is a

    A.      constructor       B.      destructor

    C.      destroyer         D.      terminator



12. Which of the following assigns the number 5 to the area variable?

    A.      area 1 = 5                           B.      area = 5

    C.      area == 5                            D.      area --> 5

    E.      area < > 5



13. The _____ mode tells C++ to open a file for input

    A.      add::ios          B.      in::file

    C.      ios::app          D.      ios::in

    E.      ios::out



14. Sending a copy of data to a program module is called _______

    A.      passing a value                      B.making a reference

    C.      recursion                            D.setting a condition
15. To use either an input or output file, the program must include the _____ header file

    A.      filestream.h            B.      fstream.h

    C.      instream.h              D.      inoutstream.h

    E.      iostream.h



16. An array name is a _____

    A.      subscript               B.      formal parameter

    C.      memory address          D.prototype



17. To enter a comment in a C++ program, you begin the comment with _____

    A.      **              B.      &&

    C.                    D.      @

E. //



18. When you pass a variable _____, C++ passes only the contents of the variable to the
    receiving function

    A.      by reference            B.      by value

    C.      globally                D.      locally



19. The compiler converts your C++ instructions into _____

    A.      edited code             B.      object code

    C.      source code             D.      translated code

20. Find the output for the following C program

    i=20,k=0;

    for(j=1;j9 && Y++!=10 && Y++>10)

    {printf("%d", Y);

    else

    printf("%d", Y);
}

21.   What is the sizeof(long int)

      (a) 4 bytes

      (b) 2 bytes

      (c) compiler dependent

      (d) 8 bytes



22.   What is the output of the following program?

      main()

      {

      char *src = "Hello World";

      char dst[100];

      strcpy(src,dst);

      printf("%s",dst);

      }strcpy(char *dst,char *src)

      {while(*src) *dst++ = *src++;

      }

      A) "Hello World"                B)"Hello"

      C)"World"                       D) NULL

      E) unidentified

23.   What is the output of the following program?

      main()

      {

      int l=6;

      switch(l)

      { default : l+=2;

      case 4: l=4;

      case 5: l++;
break;

      }

      printf("%d",l);

      }

      a)8       b)6       c)5    d)4   e)none

24.   What is the output of the following program?

      main()

      {

      int x=20;

      int y=10;

      swap(x,y);

      printf("%d %d",y,x+2);

      }

      swap(int x,int y)

      {

      int temp;

      temp =x;

      x=y;

      y=temp;

      }

      a)10,20             b) 20,12     c) 22,10      d)10,22   e)none

25.   main()

      {

      int i;

      char *p;

      i=0X89;

      p=(char *)i;

      p++;
printf("%xn",p);

            }

26.         main()

{

int i;

clrscr();

printf("%d", &i)+1;

scanf("%d", i)-1;

}

a. Runtime error.                  b. Runtime error. Access violation.

c. Compile error. Illegal syntax d. None of the above

27.         main()

{

int i = 0xff ;

printf("n%d", i<<2);

}

a. 4                 b. 512

c. 1020              d. 1024

28.         main()

{

int i, j, *p;

i = 25;

j = 100;

p = &i; // Address of i is assigned to pointer p

printf("%f", i/(*p) ); // i is divided by pointer p

}

a. Runtime error.                  b. 1.00000

c. Compile error                   d. 0.00000
29.         main()

{

int c = 5;

printf("%d", main||c);

}

a. 1                 b. 5

c. 0                 d. none of the above

30.         main()

{

char c;

int i = 456;

clrscr();

c = i;

printf("%d", c);

}

a. 456                              b. -456

c. random number                    d. none of the above

31.         main()

{

int i =10, j = 20;

clrscr();

printf("%d, %d, ", j-- , --i);

printf("%d, %d ", j++ , ++i);

}

a. 20, 10, 20, 10           b. 20, 9, 20, 10

c. 20, 9, 19, 10            d. 19, 9, 20, 10
32.           main()

       {

       int x=5;

       clrscr();

       for(;x==0;x--) {

       printf("x=%dn”", x--);

       }

       }

       a. 4, 3, 2, 1, 0             b. 1, 2, 3, 4, 5

       c. 0, 1, 2, 3, 4             d. none of the above



33.    The keyword used to define a structure is _____

 A.     Stru                                               B.    Stt


 C.     Struct                                             D.    structure




34. Header files often have the file extension _____

      A.        .H                                          B.     .HE


      C.        .HEA                                        D.     .HEAD

35.vThe step-by-step instructions that solve a problem are called _____

 A.        an algorithm


 B.        a list


 C.        a plan


 D.        a sequential structure

More Related Content

What's hot (20)

C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdf
 
C lab-programs
C lab-programsC lab-programs
C lab-programs
 
Simple c program
Simple c programSimple c program
Simple c program
 
Lect08 exercises
Lect08 exercisesLect08 exercises
Lect08 exercises
 
Programming in c
Programming in cProgramming in c
Programming in c
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
Labsheet2
Labsheet2Labsheet2
Labsheet2
 
Technical questions
Technical questionsTechnical questions
Technical questions
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
Understanding storage class using nm
Understanding storage class using nmUnderstanding storage class using nm
Understanding storage class using nm
 
Inheritance and polymorphism
Inheritance and polymorphismInheritance and polymorphism
Inheritance and polymorphism
 
Ansi c
Ansi cAnsi c
Ansi c
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
Pointers
PointersPointers
Pointers
 
Oops Paper
Oops PaperOops Paper
Oops Paper
 
Implementing stack
Implementing stackImplementing stack
Implementing stack
 
C++ project
C++ projectC++ project
C++ project
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 

Similar to Exam for c

Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit isonalisraisoni
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061gurbaxrawat
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
How c program execute in c program
How c program execute in c program How c program execute in c program
How c program execute in c program Rumman Ansari
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfYashwanthCse
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2Pamidimukkala Sivani
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanationsrinath v
 

Similar to Exam for c (20)

Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
C MCQ
C MCQC MCQ
C MCQ
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
operators.ppt
operators.pptoperators.ppt
operators.ppt
 
Data structures and algorithms unit i
Data structures and algorithms unit iData structures and algorithms unit i
Data structures and algorithms unit i
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
How c program execute in c program
How c program execute in c program How c program execute in c program
How c program execute in c program
 
C++ questions
C++ questionsC++ questions
C++ questions
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdf
 
C test
C testC test
C test
 
Oops Quiz
Oops QuizOops Quiz
Oops Quiz
 
C lab programs
C lab programsC lab programs
C lab programs
 
C lab programs
C lab programsC lab programs
C lab programs
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
C language questions_answers_explanation
C language questions_answers_explanationC language questions_answers_explanation
C language questions_answers_explanation
 
Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ  Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 

Exam for c

  • 1. 1. You can use C++ as a procedural, as well as an object-oriented, language A. True B. False 2. A default catch block catches A. all thrown objects B. no thrown objects C. any thrown object that has not been caught by an earlier catch block D. all thrown objects that have been caught by an earlier catch block 3. Adding a derived class to a base class requires fundamental changes to the base class A. True B. False 4. The use of the break statement in a switch statement is A.optional B.compulsory C.not allowed. It gives an error message D.to check an error E. None of the above 5. To expose a data member to the program, you must declare the data member in the _____ section of the class A. common B. exposed C. public D. unrestricted E. user 6. Evaluate the following expression: 3 >6&&7>4 A. True B. False 7. Which of the following are valid characters for a numeric literal constant? A.a comma B. a dollar sign ($) C.a percent sign (%) D.a space E.None of the above 8. A function that changes the state of the cout object is called a(n) _____
  • 2. A. member B. adjuster C. manipulator D. operator 9 .A constructor that accepts __________ parameters is called the default constructor. A. one B. two C. no D. three 10. Can a class have virtual destructor? A. Yes B. No 11. A function that is called automatically each time an object is destroyed is a A. constructor B. destructor C. destroyer D. terminator 12. Which of the following assigns the number 5 to the area variable? A. area 1 = 5 B. area = 5 C. area == 5 D. area --> 5 E. area < > 5 13. The _____ mode tells C++ to open a file for input A. add::ios B. in::file C. ios::app D. ios::in E. ios::out 14. Sending a copy of data to a program module is called _______ A. passing a value B.making a reference C. recursion D.setting a condition
  • 3. 15. To use either an input or output file, the program must include the _____ header file A. filestream.h B. fstream.h C. instream.h D. inoutstream.h E. iostream.h 16. An array name is a _____ A. subscript B. formal parameter C. memory address D.prototype 17. To enter a comment in a C++ program, you begin the comment with _____ A. ** B. && C. D. @ E. // 18. When you pass a variable _____, C++ passes only the contents of the variable to the receiving function A. by reference B. by value C. globally D. locally 19. The compiler converts your C++ instructions into _____ A. edited code B. object code C. source code D. translated code 20. Find the output for the following C program i=20,k=0; for(j=1;j9 && Y++!=10 && Y++>10) {printf("%d", Y); else printf("%d", Y);
  • 4. } 21. What is the sizeof(long int) (a) 4 bytes (b) 2 bytes (c) compiler dependent (d) 8 bytes 22. What is the output of the following program? main() { char *src = "Hello World"; char dst[100]; strcpy(src,dst); printf("%s",dst); }strcpy(char *dst,char *src) {while(*src) *dst++ = *src++; } A) "Hello World" B)"Hello" C)"World" D) NULL E) unidentified 23. What is the output of the following program? main() { int l=6; switch(l) { default : l+=2; case 4: l=4; case 5: l++;
  • 5. break; } printf("%d",l); } a)8 b)6 c)5 d)4 e)none 24. What is the output of the following program? main() { int x=20; int y=10; swap(x,y); printf("%d %d",y,x+2); } swap(int x,int y) { int temp; temp =x; x=y; y=temp; } a)10,20 b) 20,12 c) 22,10 d)10,22 e)none 25. main() { int i; char *p; i=0X89; p=(char *)i; p++;
  • 6. printf("%xn",p); } 26. main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above 27. main() { int i = 0xff ; printf("n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024 28. main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000
  • 7. 29. main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above 30. main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above 31. main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10
  • 8. 32. main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%dn”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above 33. The keyword used to define a structure is _____ A. Stru B. Stt C. Struct D. structure 34. Header files often have the file extension _____ A. .H B. .HE C. .HEA D. .HEAD 35.vThe step-by-step instructions that solve a problem are called _____ A. an algorithm B. a list C. a plan D. a sequential structure