File Details:

{"filename":"bsc-2-sem-cs-programming-in-c-np-3591-may-2019.pdf","title":"B.Sc. (Computer Science) IInd Semester Examination, May-2019","subject":"Programming in C (BCS-204)","total_questions":13}

Questions:

  1. What are the different data types in C? Explain any four with an example.
  2. Write a program to print all natural numbers divisible by 5 ranging from 1 to 100.
  3. Define a pointer and give the meaning of declaration: intptr; with the help of an example.
  4. Write the output of the following program: main { int i=10; int j=20; if((ij)/(i+j)>=6) printf("hello world"); else printf("world hello"); }
  5. What is a file in C? Write the commands to open and close a file.
  6. Define structures and write a program to make a structure for book entity with fields: book name, book price, book author, book publisher, year of print, and ISBN.
  7. Write a program to check that an integer string is a palindrome or not.
  8. Explain the difference between the for and while loop with an example.
  9. Explain the concept of array of pointers with example.
  10. What are the string operations in C? Explain the following string operations using examples: strcat, strlen, strcmp, strcpy.
  11. What are the operators in C? State four arithmetic operators and four logical operators.
  12. Write a program in C to multiply two matrices of nxn size each.
  13. What are formal parameters in functions? Write a program to find the biggest number among 3 numbers given by user using if else statements.
Back to list

GKPAD.COM by SK Yadav | Disclaimer

free counter