Filter

Shiksha Hive
Login
Register
Login
  • Home
  • NEB Questions
  • Notes
  • Notices
  • NEB Result

Programming in C

12 Management Computer Science Multiple Choice
8 Questions

Showing 8 of 8 (Results for all questions)

1 (1)

What is the output of C program?

void main(){
int b = 25; //b memory location = 1234; int *p; p=&b; printf("%d %d", &b, p);
}
  1. 25 25
  2. 1234 1234
  3. 25 1234
  4. 1234 25

Ans: a

2 (1)

Which statement/s is/are true to open a binary file "Record.dat" for reading and writing?

  1. file=open("Record.dat","wb")
  2. file=open("Record.dat","rb")
  3. file=open("Record.dat","ab")
  4. file=open("Record.dat","rb+")

Ans: a

3 (1)

What is the output of this statement "printf("%d", (a++))" in C programming?

  1. The current value of a
  2. the value of a increment by 1
  3. Error
  4. Garbage

Ans: c

4 (1)

Which of the following is true about FILE *fpt ?

  1. FILE is a keyword in C for representing files and fpt is a variable of FILE type
  2. FILE is a buffered stream
  3. FILE is a stream
  4. FILE is a structure and fpt is a pointer to the structure of FILE type.

Ans: d

5 (1)

What is the correct syntax to declare a structure in C?

  1. struct { }
  2. define struct { }
  3. struct [ ]
  4. struct structure_name { }

Ans: d

6 (1)

which operator is used to get the address of a variable?

  1. }*
  2. &
  3. ->
  4. .

Ans: b

7 (1)

What will be the output of the program code?

Void main() {

char str1[20]="Hello",

str[20]="world";

strcat(str1,str2);

puts(str1);

}

  1. Hello
  2. World
  3. Helloworld
  4. wordHello

Ans: c

8 (1)

What is the correct way to open a file named "data.txt" in C for reading?

  1. fopen("data.txt", "r");
  2. fopen("data.txt", "w");
  3. fopen("data.txt", "a");
  4. fopen("data.txt", "rb");

Ans: a

Sponsor

Still You Need Our Support ?

Don’t wait make a smart & logical quote here. Its pretty easy.

About us

Shiksha Hive is a Nepali online learning platform that uses AI to help students learn better. It has lots of study materials, especially for Class 12 students, to help them prepare for exams.

OPENING HOURES

Sun - Fri(10 AM - 5 PM)

Saturday - Closed

Useful Links

  • Privacy Policy
  • Curriculum
  • Model Questions
  • Blogs
  • Notice

Available Courses

  • Ui Ux Design
  • Web Development
  • App Development
  • Account
  • C Programming

Recent Post

  • 02 Apr 2024

    BCA Notes and Resources!
  • 02 Apr 2024

    Digital Paana – Your Complete E-Learning Platform for Grade 11 and 12 Students in Nepal
  • 02 Apr 2024

    Neb Class 11 Model Question 2080/2081 PDF Download
<<<<<<< HEAD logo ======= logo >>>>>>> master

Copyright © 2024 by Saino Tech. All Rights Reserved.

  • facebook
  • email
  • linkedin