Epic Systems Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
2
of 2 vote

void printDate(){

int yearInput = 2100;

int months = 12;
int days = 31;

int i ,j;

for ( i=1;i<=12;i++){
if( ( i <= 7 && i % 2 !=0) || ( i >=8 && i %2 ==0)){
//its 31 dates
days=31;
}
else if( (i!=2) && (( i <=7 && i%2 == 0) || (i>=9 && i%2!= 0))){
// its 30 days
days = 30;
}
else{
//its feb
days = 28;
if( ((yearInput % 4 == 0) && (yearInput % 100 !=0)) || (yearInput%400 == 0) )
days = 29;
}
for(j=1;j<=days;j++){
printf ("\nDay:%2d, Month:%2d , Year:%4d",j,i,yearInput);
}

}


}

- Cooked March 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 0 vote

1) function which lists all possible dates?? in which language?
2) well, for second question i believe, you need to use ASCII, like read the alphabet, convert it to ascii using functions like itoa or atoi and append that shud be the way more or less to do it...i am guessing...havent yet strtd preparing though !! :(
3) well, so suppose u know that password is 8 digits... i guess, you just have to write a function that iterates and tries all combinations for 8 digits...more like brute forcing the password...der is no way to guess it...

Thats just my highly abstract shot at the questions

- SN October 05, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Godlike!!!!!!!!!!!!!!!!!!!!!!!!!!!!

- Anonymous October 07, 2008 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

leap year check must be:

Boolean leapYear = (year % 400 == 0 ||(year % 4 == 0 && year % 100 != 0))?true:false;

- msk August 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It was a written test at my university.

- Ripul Patel May 09, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Did you have to find all possible combinations in the 3 question

- JD October 02, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i am confused....some comments wud help...

- SJ April 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public void returnMe(int year) {
		Boolean leapYear = (year % 4 == 0 && year % 100 != 0)?true:false;
		
		for (int month = 1; month <= 12; month++){
			for (int date = 1; date <= 31; date++){
				if (date > 28 && month == 2 && !leapYear ||
						date > 29 && month == 2 && leapYear) 
					break;
				if (date > 30 && (month == 4 || month == 6 || month == 9 || month == 11))
					break;
				System.out.println(year + "-" + month + "-" + date);
			}
		}
	}

- Anonymous August 04, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

leap year check must be:

Boolean leapYear = (year % 400 == 0 ||(year % 4 == 0 && year % 100 != 0))?true:false;

- msk August 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public static void printDates(int year)
{
boolean leapY = false;
if(year%400==0||year%4==0&&year%100!=0) leapY =true;
int mon = 0;
int day = 0;
for(mon =1;mon<=12;mon++)
{
for(day=1;day<=28;day++)
System.out.println(mon+"/"+day);
if(mon==2&&leapY)
System.out.println(mon+"/"+29);
if(mon!=2)
for(day=29;day<=30;day++)
System.out.println(mon+"/"+day);
if(mon%2==1&&mon<8||mon>7&&mon%2==0)
System.out.println(mon+"/"+31);
}
}

- Sean September 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public static void printDates(int year)
{
boolean leapY = false;
if(year%400==0||year%4==0&&year%100!=0) leapY =true;
int mon = 0;
int day = 0;
for(mon =1;mon<=12;mon++)
{
for(day=1;day<=28;day++)
System.out.println(mon+"/"+day);
if(mon==2&&leapY)
System.out.println(mon+"/"+29);
if(mon!=2)
for(day=29;day<=30;day++)
System.out.println(mon+"/"+day);
if(mon%2==1&&mon<8||mon>7&&mon%2==0)
System.out.println(mon+"/"+31);
}
}

- Sean September 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public class LeapYear {

static Boolean leap = false;
public static void printAllDays(int year){
if(year%400==0 || (year%4==0 && year%100!=0)){
leap = true;
}
System.out.println("For the year" +year);
for(int m=1; m<13; m++){
for(int day=1; day<32; day++){
if(m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12){
System.out.println(+m +"-" +day +"-" +year);
}
else{
if(m!=2 && day!=31){
System.out.println(+m +"-" +day +"-" +year);
}
if(m==2 && leap==true && day<30){
System.out.println(+m +"-" +day +"-" +year);
}
if(m==2 && leap==false && day<29){
System.out.println(+m +"-" +day +"-" +year);
}
}
}
}
}

public static void main(String args[]){
printAllDays(1000);
}
}

- NoName January 21, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

#include<stdio.h>

void printAllDates(int year)	{
	int days[2][13] = { {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
						{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
						};
	int i,j;
	int leap = (year%4==0)&&(year%400==0&&year%100!=0);
	char *months[13] = {"", "JAN", "FEB", "MAR", "APR", "MAY", "JUNE", "JULY", "AUG", "SEP", "OCT", "NOV", "DEC"};
	
	for(i=1;i<=12;i++)
		for(j=1;j<=days[leap][i];j++)
			printf("%2d   %s   %d\n", j, months[i], year);
}


int main()	{
	printAllDates(2000);
}

- amit Kumar August 05, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public static void printDates (int year) {
		boolean isLeapYear = (year%400 == 0 || (year%4 == 0 && year%100 != 0))? true:false;
		int daysInFeb = (isLeapYear)? 29:28;
		int[] daysOfMonth = {31, daysInFeb, 31,30,31,30,31,31,30,31,30,31};
		
		for (int month=1; month<=12; month++) {
			for (int day=1; day<=daysOfMonth[month-1]; day++) {
				System.out.println(month+"-"+day+"-"+year);
			}
		}
	}

- VG November 20, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More