0

programming languages Online Quiz - 343

Description: programming languages Online Quiz - 343
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. Compilation Error - Undeclared Identifier

  2. Compilation Error - Syntax

  3. I dont know

  4. Will Compile but no Output


Correct Option: D
  1. Compilation Error - Struct cannot be defined without a name

  2. 193149

  3. Compilation Error - Struct cannot be defined inside a Function

  4. Some Random Number


Correct Option: B

void main() { char ch='ABCD'; switch(ch) { case 'ABCD': printf("HelloABCD"); break; case 'A': printf("HelloA"); break; case 'B': printf("HelloB"); break; case 'C': printf("HelloC"); break; case 'D': printf("HelloD"); break; } }

  1. HelloA

  2. HelloB

  3. HelloABCD

  4. HelloD

  5. HelloC

  6. Compilation Error


Correct Option: D
  1. Compilation Error - Cannot define Function inside Function

  2. 50

  3. Cant say

  4. Some Random Number


Correct Option: B

void main() { printf("Hello"); return 5; printf(" World"); }

  1. I have started hating C now!!

  2. Hello

  3. Compilation Error - Cannot return when return type is Void

  4. Hello World

  5. Segmentation fault


Correct Option: B

void main() { int *ptr; int item=5; int arr[]={10,20,30,40,50}; ptr = &item; for(;item>=0;item--) { printf("%d ",*ptr); ptr--; } }

  1. 5 50 40 30 20 10

  2. 5 Followed by Random Numbers

  3. 5 4 3 2 1

  4. Segmentation Fault


Correct Option: A
  1. January 1, 1960

  2. today’s date(number of days since January 1, 1960).

  3. 1960

  4. January 1960


Correct Option: B
  1. Dennis Ritchie, Bjarne Stroustrup, Ultimatix Team

  2. Dennis Ritchie, Me

  3. Dennis Ritchie, Bjarne Stroustrup, Prateek Shrivastava

  4. Dennis Ritchie, Bjarne Stroustrup, Pratik Srivastav


Correct Option: C

Each statement in SAS should end with semicolon (;)

  1. True

  2. False


Correct Option: A

Interpret the meaning of the code %include "readit.sas";

  1. It will run the readit.sas file

  2. It will have the reference of the readit.sas file

  3. It neither have the reference nor run the readit.sas file

  4. None of the above


Correct Option: A

length(string) - returns number of characters in a string

  1. True

  2. False


Correct Option: A

scan(string,n,) - returns the nth “word” in string

  1. True

  2. False


Correct Option: A

translate(string,to,from) - changes from chars to to chars

  1. True

  2. False


Correct Option: A
- Hide questions