1-Input unit
2-output unit
3-storage
4-central processing unit
5-arithmetic and logic unit
Answer: True
Explanation:
A language is said to be closed under a operation here the complement is the operation then if upon application of that operation to any members of that language always yields a member of that language.
regular languages are closed under complement. A proof of the statement is
If a regular language 'L' is regular then there is a DFA X recognizing that regular language 'L'. to show that L' (compliment) is regular we need to have another DFA X' recognizing L'.
The initial state and transition function of both the DFAs are same except their accepting state. Then we can say that X' accepts L'.
So, we can say that regular languages are closed under complement.
Answer:
See explaination
Explanation:
java code:
class DONALD
{
static class Node
{
int data;
Node next;
}
static Node head=null;
static int largestElement(Node head)
{
Int max=Integer.MIN_VALUE;
while(head!=null)
{
if(max<head.data)
max=head.data;
head=head.next;
}
return max;
}
static int smallestElement(Node head)
{
int min=Integer.MAX_VALUE;
while(head!=null)
{
if(min>head.data)
min=head.data;
head=head.next;
}
return min;
}
static void push(int data)
{
Node newNode=new Node();
newNode.data= data;
newNode.next=(head);
(head)=newNode;
}
static void printList(Node head)
{
while(head!=null)
{
System.out.println(head.data + " -> ");
head=head.next;
}
System.out.println("NULL");
}
public static void main(String[] args)
push(15);
push(14);
push(13);
push(22);
push(17);
System.out.println("Linked list is : ");
printList(head);
System.out.println("Maximum element in linked list: ");
System.out.println(largestelement(head));
System.out.print("Maximum element in Linked List: " );
System.out.print(smallestElement(head));
}
}
Answer:
The variable used is elevenplus
Explanation:
Given
The above code segment
Required
The variable in the code
In Python, variables are used to take inputs, and they are used to storing values.
On the first line of the program, elevenplus is used to get input for age.
Up till the end of the program, no other variable is introduced.
<em>Hence, the variable in the program is </em><em>elevenplus</em>
Not really everything don’t need to be on the internet