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

void main() { ; }

  1. Compilation Error - Undeclared Identifier

  2. Compilation Error - Syntax

  3. I dont know

  4. Will Compile but no Output


Correct Option: D

void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }

  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

void main() { int Add() { return 50; } printf("%d",Add()); }

  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

Using Proc SQL, we can create a macro variable.

  1. True

  2. False


Correct Option: A

void main() { int i=5; i+=i*=i-=i/i; printf("%d",i); }

  1. 5

  2. 25

  3. 20

  4. 32


Correct Option: D

How many types of Merge are there.

  1. 1

  2. 2

  3. 3

  4. 4


Correct Option: D

Todays() returns__________?

  1. January 1, 1960

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

  3. 1960

  4. January 1960


Correct Option: B

Who is the Father of C, C++ and this Quiz?

  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

Lines beginning with an asterisk (*) are not treated as comments.

  1. True

  2. False


Correct Option: B

Lines beginning with an asterisk (*) are not treated as comments.

  1. True

  2. False


Correct Option: B

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

By using __________, we can suppress the page number in the output

  1. nopagenumber

  2. npagenumber

  3. nonumber

  4. no pagenumber


Correct Option: C

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

substr(string,position,) - returns pieces of a variable

  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