

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Convert the followings into Prolog rules,
Can a dangling reference be created in Java? Justify your answer with reasons. Prolog has several syntactic elements, ten (10) of them are as follows; nl, cut, write, not, +, -, <, <=, readint(var), readchar(var) You are required to categorized them according to the type as shown in the table given below. Special Predicates Predefined Predicates Arithmetic Operators Relational Operators You are required to write recursive predicate in PROLOG to sort all elements of a list. Just like all programming languages, PHP also supports user-defined functions. A function is a block of statements that can be used repeatedly in a program. Write a simple function in PHP that displays “Programming is Fun” on screen. Name of function should be DisplayMsg. This function does not accept any arguments. After definition, call this function to show the output.