Skip to content

CS508 - Modern Programming Languages

20 Topics 138 Posts
  • Please share mid term past papers

    Pinned mid term spring 2019 solved papers
    12
    0 Votes
    12 Posts
    3k Views
    M
    Smalltalk was the first purest ______ language and pioneered graphical user interface. Object Oriented Which of the following is the incorrect option form the following statements regarding ‘objectives of learning new languages’ ? Help in understanding the language privacy policy. Binary operator in SNOBOL must has at least _____ spaces on both sides. 1 A space is used as ______ for concatenation. Operator Sign is used for ______ in SONOBOL. Line Continuation Following are some of the reasons for studying concepts related to different programming languages EXCEPT Increased capability to design communication links COBOL was the first language that brings the concept of _________ . Structure A language evaluation criteria includes following factor EXCEPT Modularity
  • CS508 Assignment No. 03
 Solution and Discussion

    Unsolved cs508 assignment no.3
    5
    2
    0 Votes
    5 Posts
    3k Views
    cyberianC
    Assignment Cs508 2022 solution https://youtu.be/pYgxFD91Rvk
  • 0 Votes
    9 Posts
    2k Views
    Pak LoveP
    @ozair said in CS508 GDB 1 Solution and Discussion: Re: CS508 GDB.1 Solution and Discussion Total Marks 5 Starting Date Monday, February 15, 2021 Closing Date Tuesday, February 16, 2021 Status Open Question Title GDB Question Description In a programming world, Lambda Expression (i.e. lambda function) is essentially a block of code that can be assigned to a variable, passed as an argument, or returned from a function call. It has been part of several programming languages like Smalltalk, Lisp, Ruby, Scala, Python, Java and C# etc. for quite some time. In context of C# programming, a lambda can be used instead of an anonymous method/function where we do not need to provide access modifier, return type and even name of the method. For example, the following anonymous method checks if a student is teenager or not: Listing 1: (anonymous method in C# to check if a student is teenager or not) delegate(Student std) { return std.Age > 12 && std.Age < 20; } While the same functionality can be achieved by using lambda as; Listing 2: (checking if a student is teenager or not using lambda in C#) std => std.Age > 12 && std.Age < 20; Here, we can see that the code has been shortened (i.e. writability increased). However, it makes the code relatively difficult to understand as “std” in listing 2 is ambiguous (i.e. readability decreased). But what about Reliability? Being a programming language expert, you are required to compare both approaches (i.e. code written with/without lambda) and state which one is better in terms of Reliability in C# programming language. Anonymous Method Limitations It cannot contain jump statement like goto, break or continue. It cannot access ref or out parameter of an outer method. It cannot have or access unsafe code. It cannot be used on the left side of the is operator.
  • 0 Votes
    2 Posts
    591 Views
    Tahir BalochT
    Please share ideas solution
  • 0 Votes
    3 Posts
    876 Views
    zaasmiZ
    main.adb with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with per; use per; with Mn; use Mn; procedure main is -- Creating object of type Men men1 : Men; len: Natural; Begin -- Taking input ID Put_Line("Enter ID : "); Get_Line(men1.ID, len); -- Taking input Name Put_Line("Enter Name : "); Get_Line(men1.Name, len); -- Taking input Gender Put_Line("Enter Gender : "); Get_Line(men1.Gender, len); -- Taking input Height Put_Line("Enter Height : "); Get(men1.Height); -- Taking input Age Put_Line("Enter Age : "); Get(men1.Age); new_line(2); -- Print Function calling print(men1); new_line(3); end main; per.ads package Per is type Person is tagged record Name: String(1..30):= " "; Age: Integer :=0; Gender: String(1..10) := " "; end record; procedure print(Self : in out Person); end Per; main.adb with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; package body Per is procedure print(Self : in out Person) is begin Put_Line("Name is " & Self.Name); Put_Line("Age is " & Integer'Image (Self.Age)); Put_Line("Gender is " & Self.Gender); end print; end Per; mn.ads with per; use per; package Mn is type Men is new Person with record Height: Float := 0.0; ID: String(1..15) := " "; end record; overriding procedure print(Self : in out Men); end Mn; mn.adb with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with per; use per; package body Mn is procedure print(Self : in out Men) is begin Put_Line("ID is " & Self.ID); Put_Line("Name is " & Self.Name); Put_Line("Age is " & Integer'Image (Self.Age)); Put_Line("Gender is " & Self.Gender); Put_Line("Height is " & Float'Image (Self.Height)); end print; end Mn;
  • 0 Votes
    3 Posts
    1k Views
    zaasmiZ
    https://www.youtube.com/watch?v=M4nQKWJo3rA
  • CS508 Assignment 1
 Solution and Discussion

    Solved cs508 assignment 1 solution discussion spring 2020
    3
    0 Votes
    3 Posts
    2k Views
    zaasmiZ
    https://www.youtube.com/watch?v=suvkPZTheK0 Solution 100% outer = 1 OUTLOOP OUTPUT = 'Outer ' outer outer = outer + 1 iner = 1 INLOOP OUTPUT = 'Iner ' iner iner = iner + 1 LE(iner, 22) : S(INLOOP) LE(outer, 11) : S(OUTLOOP) OUTPUT = 'My id is BC120401122' END
  • 0 Votes
    5 Posts
    1k Views
    cyberianC
    Looking at these VMs at the highest-level, the differences between the CLR and JVM seem almost negligible. However, in many (if not most) cases, the differences at the VM-level mirror the key differences between the languages that use them. Because of the way these VMs, and their corresponding languages, were built, each functions slightly differently in order to provide the functional capabilities that their creators wanted to provide. What do you think about the differences between the CLR and JVM? Will you choose your next programming language based on which VM it uses? Let us know in the comments below!
  • CS508 Quiz 2 Solution and Discussion

    cs508 quiz 2 solution discussion fall 2019
    20
    0 Votes
    20 Posts
    14k Views
    zareenZ
    _________ operator in Prolog is used for List construction and also for List dismantling. CS508 !(Sign of exclamation) |(Vertical Slash) PG # 90 :(Colon) None of the given
  • CS508 Quiz 3 Solution and Discussion

    cs508 solution discussion fall 2019 quiz 3
    1
    0 Votes
    1 Posts
    714 Views
    No one has replied
  • 0 Votes
    6 Posts
    1k Views
    zareenZ
    https://www.youtube.com/watch?v=j4mJTG4sWiU
  • CS508 Quiz No. 1 Solution and Discussion

    Solved cs508 quiz 1 solution discussion fall 2019
    12
    0 Votes
    12 Posts
    8k Views
    zareenZ
    LISP was basically developed to solve ________ problems. Page:75 LISP was one of the earliest programming language. It was designed at MIT for artificial intelligence and it has since been the defacto standard language for the AI community, especially in the US. [image: YqqcYKG.png] For immediate value assignment ______ sign is used. Page 37 The $ is used for immediate value assignment even if the entire pattern does not match. It is used as follows: [image: gKNPMuJ.png] Following statement returns the union of the two list in LISP. Page : 68 [image: K6o3kdx.png] Block statement in Ada is very similar to a block in _______. Page:56 [image: 4Cbvxg8.png] _____________ was considered good for describing algorithms. Page:24 [image: TimQMFg.png] The declarative language among the following is CS508 C Page:77 [image: SIkM5O2.png] In Ada programming language Tagged types are used for _____ Page:59 [image: k1utbxn.png] _____ are a type of Aliasing. [image: 6kgY8ip.png] How many element(s) are there in LISP list (a (b c))? CS508 1 Page:63 [image: NxpDf0O.png] In __________, Enumeration type can also be used as indexes in arrays. Page:51 [image: Sb8NMfp.png]
  • CS508 Quiz 1 Solution and Discussion Fall 2019

    1
    0 Votes
    1 Posts
    422 Views
    No one has replied
  • CS508 Assignment 2 Solution and Discussion

    Solved cs508 assignment 2 solution discussion fall 2019
    4
    0 Votes
    4 Posts
    1k Views
    zareenZ
    Fall 2019_CS508_2_SOL-1.rar
  • 1 Votes
    9 Posts
    2k Views
    zareenZ
    Solution: Java: public class MyClass { public static void main(String args[]) { System.out.println("My id is BC180401429"); System.out.println("** Language is JAVA **"); for(int i=0;i<=14;i++){ for(int j=0;j<=29;j++){ System.out.print("Outer:"+i+"Inner:"+j); } } } } [image: 8P6CdT9.png] C#: using System; class Program { static void Main() { Console.WriteLine("My id is BC180401429"); Console.WriteLine("** Language is C# **"); for(int i=0;i<=14;i++){ for(int j=0;j<=29;j++){ Console.Write("Outer:"+i+"Inner:"+j); } } } } [image: Vf2OntD.png] C++: #include <iostream> using namespace std; int main() { cout<< "My id is BC180401429 \n"; cout<< "** Language is C++ ** \n"; for(int i=0;i<=14;i++){ for(int j=0;j<=29;j++){ cout<< "Outer:"<<i<<"Inner:"<<j; } } } [image: vWPXez6.png]
  • CS508 GDB.1 Solution and Discussion

    Solved gdb no.1 cs508
    11
    0 Votes
    11 Posts
    4k Views
    zaasmiZ
    I think it will be really hard to create one single language all could and importantly would used by all. All software today could be written in assembly, but it would mean getting up a website could take 6–12 months and probably cost a few million…. If we ever had a single language all would use, that language would need to do 5 things really well. And while I have seen languages that can do 2–3 out of 5, I have never seen language that can do all 5. Have really low system overhead and compile to machine code on any platform. Have terse easy to learn syntax. Support all the programming paradigms. Procedural, object oriented & functional. Have really large ecosystem 3rd party packages and great developer tooling for solving any problem in any industry. Have highly performant bridge to call directly(no REST/JSON/SOAP/XML mess…) to any language. Even if we decided today to rewrite all software to this new miracle language it would take 10 years to modernize all the legacy stuff so integration needs to be seamless.
How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
File Sharing

2

Online

3.0k

Users

2.8k

Topics

8.2k

Posts
| |